﻿        :root {
            --primary-color: #f43f5e;
            --secondary-color: #fb7185;
            --dark-bg: #1a202c;
            --dark-bg-secondary: #1f2937;
            --text-light: #f9fafb;
            --text-dark: #e2e8f0;
            --text-muted: #9ca3af;
        }

        /* === START: Page Lock CSS === */
        html {
            height: 100%;
            width: 100%;
            overflow: hidden;
            /* Lock the root element completely */
            margin: 0;
            padding: 0;
        }

        body {
            height: 100%;
            width: 100%;
            margin: 0;
            padding: 0;
            overflow-y: auto;
            /* Allow vertical scroll ONLY on the body */
            overflow-x: hidden;
            /* Prevent horizontal scroll on the body */
            position: relative;
            /* Keep for positioning context of children */
            -webkit-overflow-scrolling: touch;
            /* For better mobile experience */

            /* Existing styles */
            font-family: 'Poppins', sans-serif;
            color: var(--text-dark);
            background-color: var(--dark-bg);
            padding-bottom: 80px;
            /* Space for the bottom header */
        }

        /* === END: Page Lock CSS === */

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('https://invitationdo.com/wp-content/uploads/2025/09/Gemini_Generated_Image_qp8z8zqp8z8zqp8z1.jpg');
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center center;
            z-index: -1;
        }

        body.locked,
        body.modal-open {
            overflow: hidden;
            touch-action: none;
        }

        .container {
            max-width: 900px;
            margin: 2rem auto;
            padding: 0 1rem;
        }

        h2.main-title {
            font-weight: bold;
            font-family: cursive;
            text-align: center;
            text-transform: capitalize;
            color: #000000;
            font-size: clamp(2.5rem, 8vw, 3rem);
            text-shadow: 4px 4px 10px rgba(0, 0, 0, 0.8);
            margin-bottom: 2.5rem;
            margin-top: 4.2rem;
            position: relative;
            z-index: 31;
        }

        h2.preview-mode {
            position: fixed;
            top: 1rem;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            margin: 0;
            padding: 0 1rem;
            box-sizing: border-box;
        }

        .glass-container {
            background: rgba(31, 41, 55, 0.7);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(251, 113, 133, 0.2);
            padding: 2.5rem;
            border-radius: 1.5rem;
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
        }

        .form-section-heading {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--text-light);
            margin-bottom: 1.5rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid rgba(251, 113, 133, 0.2);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .form-section-heading i {
            color: var(--secondary-color);
        }

        label,
        .form-label {
            color: var(--text-dark);
            font-size: 0.9rem;
            font-weight: 500;
            display: block;
            margin-bottom: 0.5rem;
        }

        .form-control,
        .form-select {
            background: rgba(17, 24, 39, 0.8) !important;
            color: #fff !important;
            border: 1px solid #4b5563 !important;
            border-radius: 0.75rem !important;
            padding: 0.9rem !important;
            transition: all 0.3s ease;
            font-size: 1rem !important;
            width: 100%;
        }

        .form-control:focus,
        .form-select:focus {
            border-color: var(--secondary-color) !important;
            box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.4) !important;
            outline: none;
            background: var(--dark-bg-secondary) !important;
        }

        input[type="file"] {
            padding: 0 !important;
            background: transparent !important;
            border: none !important;
        }

        input[type="file"]::file-selector-button {
            background: #374151;
            color: #fff;
            border: none;
            padding: 0.75rem 1.25rem;
            border-radius: 0.5rem;
            cursor: pointer;
            transition: background-color 0.3s ease;
            font-weight: 500;
        }

        input[type="file"]::file-selector-button:hover {
            background: #4b5563;
        }

        .preview-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            gap: 1.5rem;
            margin-top: 1.5rem;
            margin-bottom: 1rem;
            padding: 1rem;
            background: rgba(17, 24, 39, 0.5);
            border-radius: 1rem;
        }

        .preview-item {
            position: relative;
            width: auto;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .preview-image-wrapper {
            position: relative;
            width: 100%;
            padding-top: 100%;
            height: 0;
            border-radius: 0.75rem;
            overflow: visible;
            border: 2px solid #4b5563;
            margin-bottom: 0.5rem;
            cursor: default;
            transition: all 0.3s ease;
        }

        .preview-image-wrapper:hover {
            border-color: var(--secondary-color);
            transform: scale(1.05);
        }

        .preview-item img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 0.6rem;
        }

        .edit-icon,
        .delete-icon {
            position: absolute;
            top: -12px;
            background-color: var(--dark-bg-secondary);
            color: white;
            border: 2px solid white;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
            transition: all 0.2s ease-in-out;
            font-size: 14px;
            z-index: 10;
        }

        .edit-icon {
            right: -12px;
        }

        .delete-icon {
            left: -12px;
        }

        .edit-icon:hover {
            transform: scale(1.2) rotate(10deg);
            color: #a7f3d0;
            background-color: #10b981;
        }

        .delete-icon:hover {
            transform: scale(1.2) rotate(-10deg);
            color: #fecaca;
            background-color: #ef4444;
        }

        .position-select {
            width: 100%;
            background: rgba(0, 0, 0, 0.7);
            color: #fff;
            border: none;
            padding: 0.25rem;
            font-size: 0.875rem;
            cursor: pointer;
            border-radius: 0.125rem;
            margin-top: 4px;
        }

        .position-select.error {
            background: rgba(255, 0, 0, 0.7);
        }

        .position-select:focus {
            outline: none;
            border: 1px solid var(--text-muted);
        }

        #errorMessage {
            color: #f87171;
            margin-bottom: 1rem;
            display: none;
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid #ef4444;
            padding: 0.75rem;
            border-radius: 0.5rem;
            text-align: center;
        }

        .action-btn {
            padding: 0.85rem 1.5rem;
            color: #fff;
            border: none;
            border-radius: 0.75rem;
            font-size: 1.125rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            text-transform: uppercase;
            letter-spacing: 1px;
            width: 100%;
        }

        @media (min-width: 640px) {
            .action-btn {
                width: auto;
            }
        }

        #createAlbum {
            background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
            position: relative;
            /* à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ à¤•à¥‡ à¤²à¤¿à¤ à¤†à¤µà¤¶à¥à¤¯à¤• */
            overflow: hidden;
            /* à¤à¤¨à¥€à¤®à¥‡à¤¶à¤¨ à¤•à¥‹ à¤¬à¤Ÿà¤¨ à¤•à¥‡ à¤…à¤‚à¤¦à¤° à¤°à¤–à¤¨à¥‡ à¤•à¥‡ à¤²à¤¿à¤ */
        }

        #createAlbum:hover {
            box-shadow: 0 8px 25px rgba(251, 113, 133, 0.4);
            transform: translateY(-2px);
        }


        /* === START: Pay Button Shine Animation (1.5s Speed, 1.0s Gap) === */

        #createAlbum::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 75%;
            height: 100%;
            background: linear-gradient(60deg,
                    transparent,
                    rgba(255, 255, 255, 0.35),
                    transparent);
            transform: skewX(-25deg);

            /* The total animation cycle time is now 2.5 seconds.
    (1.5s for the flash + 1.0s for the gap)
  */
            animation: shineWithPause 2.55s infinite;
        }

        @keyframes shineWithPause {
            0% {
                left: -100%;
            }

            /* à¤«à¥à¤²à¥ˆà¤¶ à¤…à¤¬ 68.63% à¤ªà¤° à¤¸à¤®à¤¾à¤ªà¥à¤¤ à¤¹à¥‹à¤—à¤¾ (1.75s) */
            68.63% {
                left: 125%;
            }

            /* à¤¬à¤¾à¤•à¥€ à¤•à¤¾ à¤¸à¤®à¤¯ (0.8s) à¤—à¥ˆà¤ª à¤°à¤¹à¥‡à¤—à¤¾ */
            100% {
                left: 125%;
            }
        }

        /* === END: Pay Button Shine Animation === */
        #previewAlbumBtn {
            background-color: #4b5563;
        }

        #editAlbumBtn {
            background-color: #4b5563;
        }

        #editAlbumBtn:hover {
            background-color: #6b7280;
            box-shadow: 0 8px 25px rgba(107, 114, 128, 0.4);
            transform: translateY(-2px);
        }

        #previewAlbumBtn:hover {
            background-color: #6b7280;
            box-shadow: 0 8px 25px rgba(107, 114, 128, 0.4);
            transform: translateY(-2px);
        }

        .action-btn:disabled {
            background: #4b5563;
            cursor: not-allowed;
            opacity: 0.6;
            transform: none;
            box-shadow: none;
        }

        .reorder-hint {
            color: #fcd34d;
            margin-top: 0.5rem;
            margin-bottom: 1rem;
            font-size: 0.875rem;
            opacity: 1;
            display: none;
            text-align: center;
        }

        .custom-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 10000;
            backdrop-filter: blur(5px);
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

        .custom-modal-overlay.show {
            opacity: 1;
            visibility: visible;
        }

        .custom-modal-content {
            background-color: var(--dark-bg-secondary);
            padding: 2rem;
            border-radius: 1rem;
            text-align: center;
            color: var(--text-dark);
            border: 1px solid var(--secondary-color);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
            transform: scale(0.9);
            transition: transform 0.3s ease;
        }

        .custom-modal-overlay.show .custom-modal-content {
            transform: scale(1);
        }

        .custom-modal-title {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--text-light);
        }

        .custom-modal-footer {
            margin-top: 1.5rem;
            display: flex;
            justify-content: center;
            gap: 1rem;
        }

        .btn-confirm,
        .btn-cancel {
            padding: 0.5rem 1.5rem;
            border: none;
            border-radius: 0.5rem;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.2s ease;
        }

        .btn-confirm {
            background-color: var(--primary-color);
            color: white;
        }

        .btn-confirm:hover {
            background-color: #d63352;
        }

        .btn-cancel {
            background-color: #4a5568;
            color: white;
        }

        .btn-cancel:hover {
            background-color: #718096;
        }

        .invalid-field {
            border-color: #ef4444 !important;
            box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.4) !important;
        }

        #imageCropModal .modal-content {
            background-color: var(--dark-bg-secondary);
            color: var(--text-dark);
            border: 1px solid var(--secondary-color);
        }

        #imageCropModal .modal-header {
            border-bottom: 1px solid var(--secondary-color);
        }

        #imageCropModal .modal-title {
            color: var(--secondary-color);
        }

        #imageCropModal .btn-close {
            filter: invert(1) grayscale(100%) brightness(200%);
        }

        #imageCropModal .modal-body {
            display: flex;
            flex-direction: column;
            height: calc(100% - 120px);
            padding: 0.5rem;
        }

        .cropper-container-wrapper {
            flex-grow: 1;
            max-height: 70vh;
            width: 100%;
            margin-bottom: 0.5rem;
            overflow: hidden;
        }

        #cropperImage {
            display: block;
            max-width: 100%;
            max-height: 100%;
        }

        #imageCropModal .modal-footer {
            border-top: 1px solid var(--secondary-color);
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 1rem;
        }

        #imageCropModal .button-row-top {
            display: flex;
            gap: 10px;
            width: 100%;
            justify-content: center;
        }

        #imageCropModal .button-row-bottom {
            display: flex;
            gap: 10px;
            width: 100%;
            justify-content: space-between;
        }

        .modal-footer .btn-secondary {
            background-color: #6b7280;
            color: white;
        }

        #undoCropBtn {
            background-color: #dc2626;
        }

        #undoCropBtn:hover {
            background-color: #ef4444;
        }

        #doneCropBtn {
            background-color: #22c55e;
        }

        #doneCropBtn:hover {
            background-color: #4ade80;
        }


        /* Styles for the new draggable corner handles */
        .cropper-point.point-sw,
        .cropper-point.point-se,
        .cropper-point.point-nw,
        .cropper-point.point-ne {
            width: 25px;
            /* Adjust size as needed */
            height: 25px;
            background-color: #3b82f6;
            /* Blue color */
            border: 2px solid #fff;
            /* White border */
            border-radius: 0;
            opacity: 1;
            transition: all 0.2s ease;
            transform: translate(-50%, -50%);
            /* Center the handle on the corner */
        }

        .cropper-point.point-sw:hover,
        .cropper-point.point-se:hover,
        .cropper-point.point-nw:hover,
        .cropper-point.point-ne:hover {
            transform: scale(1.2) translate(-50%, -50%);
        }

        /* END: Custom Cropper.js handles */


        #loadingScreen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to bottom, var(--dark-bg), var(--dark-bg-secondary));
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            transition: opacity 0.7s ease-out, visibility 0.7s ease-out;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }

        #loadingScreen.loading-show {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        .progress-container {
            width: 80%;
            max-width: 400px;
            background-color: #374151;
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 1rem;
            display: flex;
            /* Yeh line add karein */

        }

        .progress-bar {
            width: 0%;
            height: 20px;
            background: linear-gradient(90deg, #facc15, #f59e0b);
            border-radius: 10px;
            transition: width 0.4s ease-in-out;
            text-align: center;
            line-height: 20px;
            color: #422006;
            font-weight: bold;
        }

        .loading-text {
            color: var(--text-dark);
            font-family: 'Poppins', serif;
            font-size: 1.2rem;
        }

        .hidden {
            display: none !important;
        }

        header {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            background: rgba(17, 24, 39, 0.8);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            padding: 10px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-top: 1px solid rgba(251, 113, 133, 0.2);
            z-index: 100;
        }

        .header-logo img {
            height: 35px;
            width: auto;
        }

        .header-right .account-btn {
            background-color: var(--primary-color);
            color: var(--text-light) !important;
            padding: 8px 18px;
            border-radius: 50px;
            font-family: 'Poppins', sans-serif;
            font-size: 0.9rem;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
        }

        .header-right .account-btn:hover {
            background-color: var(--secondary-color);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(251, 113, 133, 0.5);
        }

        .header-right .nsl-button-svg-container {
            margin-right: 8px;
        }

        .header-right .nsl-button-label-container {
            font-family: 'Poppins', sans-serif;
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-light);
        }

        .modal-content {
            background-color: var(--dark-bg-secondary);
            color: var(--text-dark);
            border: 1px solid var(--secondary-color);
            border-radius: 15px;
        }

        .modal-header {
            border-bottom: 1px solid var(--secondary-color);
        }

        .modal-title {
            font-family: 'Playfair Display', serif;
            color: var(--secondary-color);
        }

        .modal-body {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .modal-footer {
            border-top: 1px solid var(--secondary-color);
        }

        .modal-footer .btn-secondary {
            background-color: #6b7280;
            border: none;
        }

        @media (max-width: 768px) {
            header {
                padding: 8px 15px;
            }

            .header-logo img {
                height: 30px;
            }

            .header-right .account-btn {
                padding: 5px 12px;
                font-size: 0.8rem;
            }

            .glass-container {
                padding: 1.5rem;
            }
        }

        .preview-item-container .preview-item {
            display: inline-block;
            position: relative;
            width: 100px;
            height: 100px;
            border-radius: 0.25rem;
            overflow: visible;
            margin-right: 1.5rem;
            margin-top: 10px;
        }

        .preview-item-container .preview-item .preview-image-wrapper {
            overflow: visible;
        }

        .preview-item-container .preview-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .add-more-placeholder {
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            border: 2px dashed #4b5563;
            background-color: transparent;
            transition: all 0.3s ease;
        }

        .add-more-placeholder:hover {
            border-color: var(--secondary-color);
            background-color: rgba(31, 41, 55, 0.7);
        }

        .add-more-placeholder i {
            font-size: 2.5rem;
            color: #6b7280;
            transition: all 0.3s ease;
        }

        .add-more-placeholder:hover i {
            color: var(--secondary-color);
            transform: scale(1.1);
        }

        /* === START: PREVIEW STYLES (from 23.txt) === */
        #albumContainer {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 10;
            display: none;
            background: transparent;
            overflow: hidden;
            max-width: 95vw;
            max-height: 95vh;
        }

        #albumContainer.shadow-visible {
            overflow: visible;
        }

        #albumContainer.active {
            display: block;
        }

        #flipbook {
            background: transparent;
            box-shadow: none;
            border-radius: 12px;
            overflow: hidden;
            margin: 0 auto;
            transform: perspective(2000px) rotateX(5deg) rotateY(-15deg) translateZ(-50px);
            transition: transform 0.7s ease-in-out;
            position: relative;
            z-index: 10;
        }

        #flipbook.open {
            transform: perspective(2000px) rotateX(0deg) rotateY(-0deg) translateZ(0);
            animation: bookAppear 0.7s ease-in-out;
            box-shadow: 0 45px 90px rgba(0, 0, 0, 0.7), 0 25px 50px rgba(0, 0, 0, 0.6);
        }

        #flipbook:not(.open) .hard-cover-front::before {
            content: "";
            position: absolute;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 8%, rgba(0, 0, 0, 0) 25%, rgba(255, 255, 255, 0.05) 95%, rgba(0, 0, 0, 0.15) 100%);
            z-index: 1;
        }

        @keyframes bookAppear {
            0% {
                transform: perspective(2000px) rotateY(0deg) translateZ(-50px);
            }

            100% {
                transform: perspective(2000px) rotateY(0deg) translateZ(0);
            }
        }

        #flipbook.open::after {
            content: '';
            position: absolute;
            left: 50%;
            top: 5%;
            bottom: 5%;
            width: 12px;
            transform: translateX(-50%);
            background: repeating-linear-gradient(to bottom, #a0a0a0 0, #a0a0a0 10px, transparent 10px, transparent 20px);
            background-size: 12px 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
            z-index: 100;
        }

        #flipbook.is-turning::after {
            z-index: 5;
        }

        #flipbook .page {
            background-color: #fdfaf3;
            display: block;
            position: relative;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
            transform-origin: left center;
            will-change: transform, box-shadow;
            overflow: hidden;
            border: none;
            padding: 0;
        }

        #flipbook .page:nth-child(even) {
            transform-origin: right center;
        }

        #flipbook .page img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            touch-action: none;
            user-select: none;
            -webkit-user-select: none;
            -webkit-user-drag: none;
            border-radius: 0;
        }

        #flipbook .page img.zoomable {
            cursor: zoom-in;
        }

        #flipbook .page img.zoomed {
            cursor: zoom-out;
            position: relative;
            z-index: 100;
        }

        .screenshot-style-page {
            background-color: #616161;
            background-image: url('https://invitationdo.com/wp-content/uploads/2025/07/depositphotos_70531635-stock-photo-art-spring-flowers-frame-background-1.jpg');
            background-size: cover;
            background-position: center;
            padding: 1rem;
            box-sizing: border-box;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .screenshot-style-page .cover-text-container {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            max-width: 95%;
            width: 100%;
            word-wrap: break-word;
            word-break: break-word;
            white-space: normal;
            box-sizing: border-box;
        }

        .screenshot-style-page .cover-title {
            font-family: 'Great Vibes', cursive;
            font-size: clamp(2rem, 12vw, 6rem);
            color: #ffffff;
            text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
            margin-bottom: clamp(0.5rem, 2vh, 1.5rem);
            line-height: 1.1;
        }

        .screenshot-style-page .wedding-title {
            font-family: 'Great Vibes', cursive;
            font-size: clamp(1.5rem, 10vw, 4.5rem);
            color: #f5f5f5;
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
            margin-bottom: clamp(0.5rem, 2vh, 1rem);
            line-height: 1.2;
        }

        .screenshot-style-page .cover-subtitle,
        .screenshot-style-page .cover-detail {
            font-family: 'Cormorant Garamond', serif;
            font-size: clamp(0.8rem, 4.5vw, 1.8rem);
            color: #ffffff;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
            margin: clamp(0.1rem, 0.8vh, 0.3rem) 0;
            font-weight: 700;
            line-height: 1.3;
        }

        .hard-cover-front,
        .hard-cover-back {
            background-size: cover;
            background-position: center;
            box-shadow: inset 0 0 80px rgba(0, 0, 0, .9);
        }

        .page-number {
            position: absolute;
            bottom: 10px;
            right: 15px;
            font-size: clamp(0.8rem, 2vw, 1rem);
            color: #fff;
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
            font-style: italic;
            background-color: rgba(0, 0, 0, 0.4);
            padding: 2px 8px;
            border-radius: 4px;
            z-index: 2;
        }

        #zoomHint {
            color: #fff;
            font-size: clamp(0.9rem, 2.5vw, 1.1rem);
            background: rgba(0, 0, 0, 0.8);
            padding: 0.5rem 1rem;
            border-radius: 6px;
            animation: blink 4s ease forwards;
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
            position: absolute;
            z-index: 25;
            text-align: center;
            display: none;
            top: -40px;
            left: 50%;
            transform: translateX(-50%);
            max-width: 200px;
        }

        @keyframes blink {
            0% {
                opacity: 0;
                transform: translateY(10px) scale(0.9);
            }

            10% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }

            90% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }

            100% {
                opacity: 0;
                transform: translateY(-10px) scale(0.9);
            }
        }

        .astro-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.9);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
        }

        .astro-overlay.active {
            display: flex;
        }

        .astro-image {
            max-width: 90%;
            max-height: 90%;
            object-fit: contain;
            border: 2px solid #fff;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
            user-select: none;
            -webkit-user-select: none;
            -webkit-user-drag: none;
        }

        .astro-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            padding: 0.5rem 1rem;
            font-size: 1rem;
            background: #718096;
            color: #fff;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.3s ease;
            border: none;
            font-weight: bold;
        }

        .astro-close:hover {
            background: #4a5568;
        }

        body.landscape .container>h2.main-title,
        body.landscape .invitation-link,
        body.landscape .bottom-buttons-container {
            display: none !important;
        }

        body.landscape #rotateIcon {
            display: none !important;
        }

        .invitation-link {
            text-align: center;
            padding: 10px;
            background: transparent;
            border-radius: 8px;
            font-size: clamp(1.5rem, 3vw, 1.5rem);
            font-weight: bold;
            position: fixed;
            bottom: 50px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 5;
            width: fit-content;
            min-width: 200px;
            display: none;
        }

        .invitation-link h2 {
            font-weight: bold;
            font-family: cursive;
            text-align: center;
            text-transform: capitalize;
            color: #000000;
            font-size: clamp(2rem, 5vw, 3rem);
            margin-bottom: 2rem;
        }

        /* New animated rotate icon CSS */
        #rotateIcon {
            position: fixed;
            left: 50%;
            bottom: 130px;
            transform: translateX(-50%);
            width: 140px;
            height: 140px;
            z-index: 1001;
            cursor: pointer;
            display: none;
            display: flex;
            justify-content: center;
            align-items: center;
            box-shadow: none;
        }

        #rotateIcon .icon-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;

        }

        #rotateIcon .phone-image {
            position: absolute;
            width: 70px;
            height: 100px;
            object-fit: contain;
            animation: phone-orientation-animation 4s infinite ease-in-out;
        }

        #rotateIcon .cross-icon,
        #rotateIcon .check-icon {
            position: absolute;
            font-size: 40px;
            top: 50%;
            transform: translateY(-50%);

        }

        #rotateIcon .cross-icon {
            color: #FF4136;
            opacity: 1;
            animation: cross-fade-animation 4s infinite ease-in-out;

        }

        #rotateIcon .check-icon {
            color: #2ECC40;
            opacity: 0;
            animation: check-fade-animation 4s infinite ease-in-out;
        }

        @keyframes phone-orientation-animation {
            0% {
                transform: rotate(0deg);
                width: 60px;
                height: 90px;
            }

            20% {
                transform: rotate(0deg);
                width: 60px;
                height: 90px;
            }

            40% {
                transform: rotate(90deg);
                width: 90px;
                height: 60px;
            }

            80% {
                transform: rotate(90deg);
                width: 90px;
                height: 60px;
            }

            100% {
                transform: rotate(0deg);
                width: 60px;
                height: 90px;
            }
        }

        @keyframes cross-fade-animation {
            0% {
                opacity: 1;
                transform: translateY(-50%) scale(1) translateX(35px);
            }

            30% {
                opacity: 0;
                transform: translateY(-50%) scale(0.5) translateX(35px);
            }

            30.1% {
                transform: translateY(-50%) scale(0.5) translateX(50px);
            }

            70% {
                opacity: 0;
                transform: translateY(-50%) scale(0.5) translateX(50px);
            }

            70.1% {
                transform: translateY(-50%) scale(0.5) translateX(35px);
            }

            100% {
                opacity: 1;
                transform: translateY(-50%) scale(1) translateX(35px);
            }
        }

        @keyframes check-fade-animation {
            0% {
                opacity: 0;
                transform: translateY(-50%) scale(0) translateX(35px);
            }

            30% {
                opacity: 0;
                transform: translateY(-50%) scale(0) translateX(35px);
            }

            30.1% {
                transform: translateY(-50%) scale(0) translateX(50px);
            }

            50% {
                opacity: 1;
                transform: translateY(-50%) scale(1.2) translateX(50px);
            }

            70% {
                opacity: 1;
                transform: translateY(-50%) scale(1) translateX(50px);
            }

            70.1% {
                transform: translateY(-50%) scale(0) translateX(35px);
            }

            90% {
                opacity: 0;
                transform: translateY(-50%) scale(0) translateX(35px);
            }

            100% {
                opacity: 0;
                transform: translateY(-50%) scale(0) translateX(35px);
            }
        }

        /* New buttons container */
        .bottom-buttons-container {
            position: fixed;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            display: none;
            gap: 15px;
            z-index: 50;
            padding: 10px 20px;
            background-color: rgba(0, 0, 0, 0.6);
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        }

        #shareAlbumIcon,
        #musicControl {
            width: 45px;
            height: 45px;
            background-color: transparent;
            color: #fff;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 20px;
            cursor: pointer;
            transition: transform 0.3s, background-color 0.3s;
        }

        #shareAlbumIcon:hover,
        #musicControl:hover {
            transform: scale(1.1);
        }

        /* Initial Overlay (Gift Box) CSS */
        #initialOverlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            display: none;
            /* Initially hidden */
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 10000;
            cursor: pointer;
            perspective: 1000px;
            opacity: 1;
            transition: opacity 1s ease-out;
        }

        #initialOverlay.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .gift-box {
            position: relative;
            width: 200px;
            height: 150px;
            background: #e74c3c;
            border-radius: 10px;
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
            transform-style: preserve-3d;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        .gift-top {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 50px;
            background: #c0392b;
            border-radius: 10px 10px 0 0;
            transform-origin: bottom center;
            z-index: 1;
            box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.2);
        }

        .ribbon {
            position: absolute;
            width: 40px;
            height: 100%;
            background: #f1c40f;
            z-index: 2;
            box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
        }

        .ribbon::before {
            content: '';
            position: absolute;
            width: 100%;
            height: 40px;
            background: #f1c40f;
            top: 50%;
            left: 0;
            transform: translateY(-50%);
        }

        .ribbon::after {
            content: '';
            position: absolute;
            width: 60px;
            height: 60px;
            background: #f1c40f;
            border-radius: 50%;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 3;
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
        }

        .message-tap {
            margin-top: 40px;
            font-family: 'Great Vibes', cursive;
            font-size: 2.2rem;
            color: #d4af37;
            text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
            animation: pulse 1.5s infinite alternate;
        }

        @keyframes pulse {
            0% {
                transform: scale(1);
                opacity: 1;
            }

            100% {
                transform: scale(1.15);
                opacity: 0.9;
            }
        }

        .confetti {
            position: absolute;
            width: 10px;
            height: 10px;
            background: #fff;
            border-radius: 50%;
            animation: confettiFall 2s ease-out forwards;
            opacity: 0;
        }

        @keyframes confettiFall {
            0% {
                transform: translateY(0) rotate(0);
                opacity: 1;
            }

            100% {
                transform: translateY(100vh) rotate(720deg);
                opacity: 0;
            }
        }

        /* === END: PREVIEW STYLES === */

        /* === START: Custom Radio Button Styles for Album Shape === */
        .album-shape-selector {
            display: grid;
            grid-template-columns: 1fr 1fr;
            /* Creates two columns */
            gap: 1rem;
            /* Space between the two options */
        }

        .album-shape-selector.invalid-field {
            border: 2px solid #ef4444;
            border-radius: 1rem;
            padding: 0.5rem;
            background-color: rgba(239, 68, 68, 0.1);
        }

        .album-shape-selector input[type="radio"] {
            display: none;
            /* Hide the default radio button */
        }

        .radio-tile {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 1.5rem 1rem;
            border: 2px solid #4b5563;
            border-radius: 0.75rem;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            height: 100%;
            background: rgba(17, 24, 39, 0.8);
        }

        .radio-tile:hover {
            border-color: var(--secondary-color);
            transform: translateY(-5px);
        }

        /* Style for the selected option */
        .album-shape-selector input[type="radio"]:checked+.radio-tile {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.4);
            background: var(--dark-bg-secondary);
        }

        .ratio-icon {
            border: 2px solid #9ca3af;
            border-radius: 4px;
            margin-bottom: 1rem;
            background-color: #374151;
        }

        .ratio-icon-standard {
            width: 60px;
            height: 34px;
            /* Represents 16:9 ratio */
        }

        .ratio-icon-wide {
            width: 75px;
            height: 25px;
            /* Represents 3:1 ratio */
        }

        .radio-tile .tile-title {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-light);
        }

        .radio-tile .tile-description {
            font-size: 0.85rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }

        /* === END: Custom Radio Button Styles === */

        /* START: Coupon Message Styles */
        #couponMessage.success {
            color: #a7f3d0;
        }

        #couponMessage.error {
            color: #f87171;
        }

        /* END: Coupon Message Styles */

        /* START: Home Icon Styles */
        .home-icon-link {

            top: 35px;
            left: 20px;
            z-index: 101;
            /* Higher than the bottom header */
            background-color: rgba(31, 41, 55, 0.7);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            color: var(--text-light);
            width: 45px;
            height: 45px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 20px;
            text-decoration: none;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(251, 113, 133, 0.2);
            transition: all 0.3s ease;
        }

        .home-icon-link:hover {
            transform: scale(1.1) rotate(-5deg);
            background-color: var(--primary-color);
            box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
        }

        @media (max-width: 768px) {
            .home-icon-link {
                top: 30px;
                left: 15px;
                width: 40px;
                height: 40px;
                font-size: 18px;
            }
        }

        /* END: Home Icon Styles */

        /* === START: Professional Watermark (Excluding Photo Pages) === */
        /* Watermark ko front cover, back cover, aur aise pages par lagayega jinmein photo nahi hai */
        .hard-cover-front::after,
        .hard-cover-back::after,
        #flipbook .page:not(:has(img))::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;

            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='150'%3E%3Ctext x='50%25' y='50%25' dominant-baseline='middle' text-anchor='middle' fill='%23000' font-family='Poppins, sans-serif' font-size='24' font-weight='600' transform='rotate(-30, 140, 75)'%3EPREVIEW ALBUM%3C/text%3E%3C/svg%3E");

            background-repeat: repeat;
            background-size: 280px 150px;

            opacity: 0.1;
            z-index: 2;
            pointer-events: none;
        }

        /* Cover page ke text ko watermark ke upar laayega */
        .screenshot-style-page .cover-text-container {
            position: relative;
            z-index: 3;
        }

        /* === END: Professional Watermark (Excluding Photo Pages) === */

        /* === START: Global Background Watermark === */
        body::after {
            content: '';
            /* Pseudo-element banane ke liye zaroori */
            position: fixed;
            /* Taki scroll karne par bhi watermark na hile */
            top: 0;
            left: 0;
            width: 100vw;
            /* Poori screen ki chaudai */
            height: 100vh;
            /* Poori screen ki unchai */

            /* Yahan watermark ki SVG image hai */
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='150'%3E%3Ctext x='50%25' y='50%25' dominant-baseline='middle' text-anchor='middle' fill='%23000' font-family='Poppins, sans-serif' font-size='24' font-weight='600' transform='rotate(-30, 140, 75)'%3EPREVIEW ALBUM%3C/text%3E%3C/svg%3E");

            background-repeat: repeat;
            /* Watermark ko repeat karega */
            background-size: 280px 150px;
            /* Watermark ka size */

            opacity: 0.1;
            /* Watermark kitna halka dikhega */
            z-index: -1;
            /* Isse watermark sabhi content ke peeche chala jayega */
            pointer-events: none;
            /* Isse watermark par click nahi hoga aur aap uske upar ke content ko select kar payenge */
        }

        /* === END: Global Background Watermark === */



        /* Video Placeholder Styling */
        .video-placeholder {
            width: 80%;
            /* Ya jo bhi width aap chahte hain */
            max-width: 400px;
            /* Maximum width */
            margin: 20px auto;
            /* Margin top/bottom aur center align */

            border-radius: 8px;
            /* Thode rounded corners */
            overflow: hidden;
            /* Content ko bahar na jane de */

        }

        .video-placeholder img,
        .video-placeholder video {
            width: 100%;
            height: auto;
            display: block;
            /* Extra space remove karne ke liye */
            animation: swing 1.2s infinite alternate;

        }

        @-webkit-keyframes swing {
            0% {
                -webkit-transform: rotate(-3deg);
            }

            50% {
                -webkit-transform: rotate(3deg);
            }

            100% {
                -webkit-transform: rotate(-3deg);
            }
        }

        @keyframes swing {
            0% {
                transform: rotate(-3deg);
            }

            50% {
                transform: rotate(3deg);
            }

            100% {
                transform: rotate(-3deg);
            }
        }

        /* Optional: Loading screen ko thoda adjust karein agar zaroorat pade */
        #loadingScreen {
            display: flex;
            /* Flexbox use karein content ko center karne ke liye */
            flex-direction: column;
            /* Content ko column mein rakhein */
            justify-content: center;
            /* Vertically center */
            align-items: center;
            /* Horizontally center */
            text-align: center;
        }

        /* === START: EDIT ALBUM STYLES (UPDATED) === */
        .album-edit-save-btn {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 9999;
            padding: 12px 24px;
            background: linear-gradient(45deg, #22c55e, #4ade80);
            /* Green gradient */
            color: white;
            border: none;
            border-radius: 50px;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 5px 20px rgba(34, 197, 94, 0.4);
            transition: all 0.3s ease;
        }

        .album-edit-save-btn:hover {
            transform: translateX(-50%) translateY(-3px);
            box-shadow: 0 8px 25px rgba(34, 197, 94, 0.6);
        }

        .album-edit-save-btn i {
            margin-right: 8px;
        }

        .edit-mode .image-drag-handle {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 40px;
            height: 40px;
            background-color: rgba(0, 0, 0, 0.6);
            color: #fff;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 18px;
            cursor: move;
            z-index: 5;
            opacity: 1;
            transition: opacity 0.3s ease;
            border: 2px solid white;
        }


        .edit-mode .is-movable {
            cursor: move;
            border: 3px dashed #3b82f6 !important;
            box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.5);
        }

        /* === END: EDIT ALBUM STYLES === */

        /* Instruction ko landscape me hide karne ke liye */
        body.landscape #editInstruction {
            display: none !important;
        }

        /* Edit mode me rotate icon ko niche karne ke liye */
        body.album-is-editing #rotateIcon {
            bottom: 80px;
        }

        /* === START: Back to Form Button (from Preview) === */
        .back-to-form-btn {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 9999;
            /* Sabse upar */
            padding: 10px 20px;
            background: linear-gradient(45deg, #6b7280, #4b5563);
            /* Grey gradient */
            color: white;
            border: none;
            border-radius: 50px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
            transition: all 0.3s ease;
            display: none;
            /* Initially hidden, JS will show it */
        }

        .back-to-form-btn.show {
            display: block;
        }

        .back-to-form-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
        }

        .back-to-form-btn i {
            margin-right: 8px;
        }

        @media (max-width: 768px) {
            .back-to-form-btn {
                top: 15px;
                right: 15px;
                padding: 8px 15px;
                font-size: 0.9rem;
            }
        }

        /* === END: Back to Form Button === */

        /* ========================================================================= */
        /* PRELOADER STYLE START */
        /* ========================================================================= */
        /* PRELOADER STYLE OPTION 2 */
        #preloader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 9999;
            background-color: var(--dark-bg);
            display: flex;
            justify-content: center;
            align-items: center;
            transition: opacity 0.5s ease-out;
        }

        .heart {
            width: 60px;
            height: 60px;
            background-color: var(--primary-color);
            position: relative;
            transform: rotate(45deg);
            /* ==== FIX PART 1: Animation ka naam badal diya ==== */
            animation: heart-pulse 1.2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
        }

        .heart::before,
        .heart::after {
            content: '';
            position: absolute;
            width: 60px;
            height: 60px;
            background-color: var(--primary-color);
            border-radius: 50%;
        }

        .heart::before {
            top: 0;
            left: -30px;
        }

        .heart::after {
            top: -30px;
            left: 0;
        }

        /* ==== FIX PART 2: Keyframe ka naam badal diya ==== */
        @keyframes heart-pulse {
            0% {
                transform: scale(0.95) rotate(45deg);
            }

            5% {
                transform: scale(1.1) rotate(45deg);
            }

            39% {
                transform: scale(0.85) rotate(45deg);
            }

            45% {
                transform: scale(1) rotate(45deg);
            }

            60% {
                transform: scale(0.95) rotate(45deg);
            }

            100% {
                transform: scale(0.9) rotate(45deg);
            }
        }

        /* ========================================================================= */
        /* PRELOADER STYLE END */
        /* ========================================================================= */
