    /* Background and global styles */
    body {
        margin: 0;
        padding: 0;
        min-height: 100vh;
        background: linear-gradient(135deg, #4efcab 0%, #00110a 100%);
        position: relative;
        overflow-x: hidden;
    }

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: 
            radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
            radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
            url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2399e599' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        z-index: -1;
    }

    /* Floating leaves animation */
    @keyframes floatLeaf {
        0% { transform: translate(0, 0) rotate(0deg); }
        50% { transform: translate(10px, 10px) rotate(180deg); }
        100% { transform: translate(0, 0) rotate(360deg); }
    }

    .leaf {
        position: fixed;
        width: 20px;
        height: 20px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234CAF50' opacity='0.2' d='M17,8C8,10,5.9,16.17,3.82,21.34L5.71,22l1-1.73,1.73,1,0.57-1,1-1.73,1.73,1,0.57-1,1-1.73,1.73,1,0.57-1,1-1.73,1.73,1,0.57-1,1-1.73,1.73,1,0.57-1,1-1.73L24,14C20,9,20,8,17,8z'/%3E%3C/svg%3E") no-repeat center/contain;
        pointer-events: none;
        animation: floatLeaf 15s infinite linear;
    }

    /* Add multiple leaves with different positions and animations */
    body::after {
        content: '';
        position: fixed;
        top: 10%;
        left: 5%;
        right: 0;
        bottom: 0;
        z-index: -1;
        background: 
            fixed
            no-repeat
            calc(10% + 50px) 20% / 20px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234CAF50' opacity='0.2' d='M17,8C8,10,5.9,16.17,3.82,21.34L5.71,22l1-1.73,1.73,1,0.57-1,1-1.73,1.73,1,0.57-1,1-1.73,1.73,1,0.57-1,1-1.73,1.73,1,0.57-1,1-1.73,1.73,1,0.57-1,1-1.73L24,14C20,9,20,8,17,8z'/%3E%3C/svg%3E"),
            fixed
            no-repeat
            80% 70% / 15px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234CAF50' opacity='0.2' d='M17,8C8,10,5.9,16.17,3.82,21.34L5.71,22l1-1.73,1.73,1,0.57-1,1-1.73,1.73,1,0.57-1,1-1.73,1.73,1,0.57-1,1-1.73,1.73,1,0.57-1,1-1.73,1.73,1,0.57-1,1-1.73L24,14C20,9,20,8,17,8z'/%3E%3C/svg%3E");
    }

    /* Card container enhancements */
    .card-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        padding: 20px;
        position: relative;
        z-index: 1;
        margin-bottom: 250px;
    }

    /* Card style improvements */
    .card {
        flex: 0 0 auto;
        width: 135px;
        height: 180px;
        backdrop-filter: blur(5px);
        border-radius: 15px;
        padding: 12px;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        margin: 8px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        cursor: pointer;
    }

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

    .card img {
        width: 140px;      
        height: 140px;
        object-fit: contain;
        margin: auto;
        position: relative;
        left: 50%;
        transform: translateX(-50%);

        /* width: 160px;      
        height: 160px;
        object-fit: contain; 
        display: block;
        margin: 0 auto;       */
    }
    
    .card {
        position: relative;
        cursor: pointer;
        transition: all 0.3s ease;
        border: 3px solid transparent;
        border-radius: 12px;
        /* background: #fff; */
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        overflow: hidden;
    }

    .card.selected {
        border-color: #ffffff;
        background: #c7fcc76b;
        box-shadow: 0 0 15px rgba(76,175,80,0.3);
        .card-content{
            background: #01ff09;
        }
    }

    .card.selected .card-content h3 {
        color: #ffffff;
    }
    
    /* Selection indicator styles */
    .card .circle {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        border: 2px solid #ccc;
        background: transparent;
        transition: all 0.3s ease;
        z-index: 1;
    }
    
    .card.selected .circle {
        background: #4CAF50;
        border-color: #4CAF50;
        box-shadow: 0 0 10px rgba(76,175,80,0.5);
    }

    .card.selected .circle::after {
        content: '✓';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-size: 14px;
    }

    /* Selection box styles */
    .selection-box {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background: rgb(255 255 255 / 78%);
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        width: 300px;
        z-index: 1000;
        transition: transform 0.3s ease;
    }

    .selection-content {
        padding: 15px;
        max-height: 300px;
        overflow-y: auto;
        transition: max-height 0.3s ease;
    }

    .selection-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid #eee;
    }

    .selection-title {
        font-weight: 600;
        color: #333;
    }

    .selection-count {
        background: #4CAF50;
        color: white;
        padding: 3px 8px;
        border-radius: 12px;
        font-size: 0.9em;
    }

    .selection-toggle {
        width: 100%;
        text-align: center;
        padding: 5px 0;
        cursor: pointer;
        border-top: 1px solid #eee;
        background: #f8f8f8;
        border-radius: 0 0 10px 10px;
    }

    .toggle-arrow {
        display: inline-block;
        transition: transform 0.3s ease;
        color: #666;
        font-size: 12px;
    }

    .selection-box.collapsed .toggle-arrow {
        transform: rotate(180deg);
    }

    .selection-box.collapsed .selection-content {
        max-height: 0;
        padding: 0;
        overflow: hidden;
    }

    .selected-items {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .selected-item {
        display: flex;
        align-items: center;
        padding: 8px;
        background: #f5f5f5;
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .selected-item:hover {
        background: #eeeeee;
    }

    .selected-item img {
        width: 40px;
        height: 40px;
        object-fit: cover;
        border-radius: 6px;
        margin-right: 10px;
    }

    .selected-item-name {
        flex-grow: 1;
        font-size: 0.9em;
        color: #333;
    }

    .remove-item {
        color: #ff4444;
        font-weight: bold;
        padding: 0 8px;
        cursor: pointer;
    }

    .reset-button {
        width: 100%;
        padding: 8px;
        margin-top: 10px;
        background: #ff4444;
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .reset-button:hover {
        background: #ff2222;
    }

    .selection-error {
        color: #ff4444;
        font-size: 0.9em;
        margin-top: 5px;
        display: none;
    }

    .selection-error.show {
        display: block;
    }

    /* Disable Generate button when not enough items selected */
    #generate:disabled {
        opacity: 1;
        cursor: not-allowed;
    }
    
    /* Optimize animation performance */
    .floating-image {
        will-change: transform;
        transform: translateZ(0);
    }
    
    /* Preload critical images */
    .preload-images {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    /* Go to top button */
    .go-to-top {
        position: fixed;
        bottom: 40px;
        right: 20px;
        width: 55px;
        height: 55px;
        background: #ff000041;
        border-radius: 50%;
        display: none;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        color: white;
        font-size: 35px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
        z-index: 1000;
    }

    .go-to-top:hover {
        background: #ff00004b;
        transform: translateY(-3px);
    }

    .go-to-top.visible {
        display: flex;
    }

    .card-content {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 8px;
    }

    .card-content h3 {
        margin: 0;
        padding: 0;
        font-size: 20px;
        text-align: center;
        width: 100%;
    }

    /* Blank screen improvements */
    #blank-screen {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, #4efcab 0%, rgba(0, 24, 14, 0.95) 100%);
        backdrop-filter: blur(8px);
        display: none;
        z-index: 9999;
    }

    .white-box {
        background: #c6e6d8e3;
        padding: 20px;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        text-align: center;
        width: min(90%, 350px);
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        animation: fadeInScale 0.5s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 0;
    }
    #blank-screen .white-box{
        height: 45%;
    }

    .white-box .logo {
        width: min(100px, 30%);
        height: auto;
        margin: 10px auto;
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .loading-circles {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin: 15px 0;
    }

    .loading-circle {
        width: 12px;
        height: 12px;
        background: #E8E8E8;
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    .loading-text {
        color: #014703;
        font-size: clamp(14px, 4vw, 18px);
        margin: 10px 0;
        font-weight: 500;
        word-wrap: break-word;
        max-width: 100%;
        padding: 0 10px;
    }

    .verify-button {
        background: #014703;
        color: white;
        border: none;
        padding: 10px 25px;
        border-radius: 25px;
        font-size: clamp(14px, 3.5vw, 16px);
        cursor: pointer;
        transition: all 0.3s ease;
        margin: 15px 0;
        box-shadow: 0 4px 15px rgba(1, 71, 3, 0.2);
        width: min(200px, 80%);
    }

    .verify-button:hover {
        background: #016004;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(1, 71, 3, 0.3);
    }

    @keyframes fadeInScale {
        from {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.9);
        }
        to {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    }

    /* Media queries for better mobile responsiveness */
    @media screen and (max-width: 480px) {
        .white-box {
            padding: 15px;
            width: 85%;
        }

        .loading-circles {
            gap: 6px;
            margin: 12px 0;
        }

        .loading-circle {
            width: 10px;
            height: 10px;
        }

        .verify-button {
            padding: 8px 20px;
            margin: 12px 0;
        }
    }

    @media screen and (max-height: 600px) {
        .white-box {
            padding: 15px;
        }

        .white-box .logo {
            width: 80px;
            margin: 5px auto;
        }

        .loading-circles {
            margin: 10px 0;
        }

        .verify-button {
            margin: 10px 0;
        }
    }

    .blinking-dot {
        display: inline-block;
        animation: blink 1s infinite;
    }

    @keyframes blink {
        0%, 100% { opacity: 1; }
        50% { opacity: 0; }
    }

    /* Text selection styles */
    .fix-stroke, .small-text, .loading-text {
        cursor: default;
        user-select: none;
    }

    /* Ensure the white box container is properly positioned */
    #popup-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
    }

    /* Add shake animation */
    @keyframes shake {
        0%, 100% { transform: translateX(0); }
        10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
        20%, 40%, 60%, 80% { transform: translateX(5px); }
    }

    .shake {
        animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    }

    /* Error message for generate button */
    .generate-error {
        color: #ff0000;
        font-size: 14px;
        margin-top: 10px;
        text-align: center;
        opacity: 0;
        transition: opacity 0.3s ease;
        font-weight: bold;
    }

    .generate-error.show {
        opacity: 1;
    }

    /* Update generate button styles */
    #generate {
        position: relative;
        transition: all 0.3s ease;
        font-size: 20px;
    }

    #generate:disabled {
        opacity: 1;
        cursor: not-allowed;
    }

    .fixed-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        padding: 15px 20px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }

    .fixed-header.visible {
        transform: translateY(0);
    }

    .fixed-header input {
        padding: 8px 15px;
        border: 2px solid #4CAF50;
        border-radius: 20px;
        font-size: 14px;
        width: 200px;
        outline: none;
        transition: all 0.3s ease;
    }

    .fixed-header input:focus {
        border-color: #45a049;
        box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
    }

    .fixed-header button {
        padding: 8px 20px;
        background: #4CAF50;
        color: white;
        border: none;
        border-radius: 20px;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .fixed-header button:hover {
        background: #45a049;
        transform: translateY(-1px);
    }

    .fixed-header button:active {
        transform: translateY(1px);
    }

    .fixed-header .warning {
        color: #ff4444;
        font-size: 14px;
        position: absolute;
        bottom: -20px;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
    }

    /* Adjust main header spacing */
    .header {
        margin-top: 20px;
        padding-top: 60px;
    }
    