<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">

<title>Wealth Appreciation</title>

<style>

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

html,body{
    width:100%;
    min-height:100%;
}

body{
    background:#f3ffe9;
    font-family:Arial,Helvetica,sans-serif;
    color:#222;
}

.app{
    width:100%;
    max-width:480px;
    min-height:100vh;
    margin:auto;
    overflow:hidden;
    background:linear-gradient(to bottom,#fffef1 0%,#f5ffe9 100%);
    padding-bottom:25px;
}


/* HEADER */

.header{
    height:67px;
    background:#08765b;
    color:#fff;
    display:flex;
    align-items:center;
    position:relative;
}

.back{
    position:absolute;
    left:22px;
    top:13px;
    width:38px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:38px;
    font-weight:200;
    line-height:1;
    text-decoration:none;
}

.header-title{
    width:100%;
    text-align:center;
    font-size:21px;
    font-weight:600;
}

.records{
    position:absolute;
    right:17px;
    top:23px;
    color:#fff;
    font-size:15px;
    text-decoration:none;
}


/* HERO */

.hero{
    width:100%;
    height:350px;
    overflow:hidden;
    background:#faffdf;
}

.hero img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
    object-position:center;
}


/* EARNINGS */

.earnings-card{
    width:94%;
    height:155px;
    margin:-2px auto 0;
    border:5px solid #fff;
    border-radius:30px;
    overflow:hidden;
    display:grid;
    grid-template-columns:1fr 1fr;
    background:linear-gradient(105deg,#bdeeff 0%,#efffdc 48%,#caff91 100%);
    box-shadow:0 2px 7px rgba(0,0,0,.08);
    position:relative;
    z-index:2;
}

.earning{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}

.amount{
    color:#45b94e;
    font-size:25px;
    font-weight:700;
    line-height:1;
    margin-bottom:15px;
}

.label{
    color:#666;
    font-size:14px;
    font-weight:400;
}


/* STORAGE */

.storage{
    width:92%;
    height:68px;
    margin:26px auto 0;
    border-radius:25px;
    background:linear-gradient(100deg,#fff0b4 0%,#ffe5a1 100%);
    display:flex;
    align-items:center;
    justify-content:center;
    gap:18px;
}

.dot{
    width:19px;
    height:19px;
    border-radius:50%;
    background:#ffd900;
    box-shadow:0 1px 3px rgba(0,0,0,.05);
}

.storage-title{
    color:#ed5555;
    font-size:17px;
    font-weight:700;
}


/* PRODUCTS */

.products{
    width:92%;
    margin:22px auto 0;
    padding:14px 0 10px;
    border-radius:28px;
    background:linear-gradient(135deg,#ffd84c 0%,#ffca68 48%,#ffaaa0 100%);
    border:4px solid #fff;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
}

.product{
    width:88%;
    min-height:145px;
    margin:14px auto;
    padding:18px 15px;
    border-radius:30px;
    background:linear-gradient(135deg,#ffe49a 0%,#ffdca4 100%);
    display:flex;
    align-items:center;
    cursor:pointer;
    transition:.15s;
}

.product:active{
    transform:scale(.98);
}

.product-left{
    width:25%;
    display:flex;
    justify-content:center;
    align-items:center;
}

.days-box{
    width:76px;
    height:88px;
    border-radius:20px;
    background:linear-gradient(180deg,#ff786f 0%,#f43745 60%,#ff8c6e 100%);
    color:#fff;
    text-align:center;
    display:flex;
    flex-direction:column;
    justify-content:center;
    box-shadow:0 4px 8px rgba(238,67,67,.22);
    position:relative;
}

.days-box:before{
    content:"";
    position:absolute;
    width:58px;
    height:10px;
    background:#fff4d6;
    border-radius:10px;
    top:8px;
    left:9px;
}

.days-number{
    font-size:26px;
    font-weight:700;
    position:relative;
    z-index:2;
}

.days-text{
    font-size:13px;
    font-weight:700;
    margin-top:3px;
}

.product-info{
    width:55%;
    padding-left:10px;
}

.product-name{
    font-size:16px;
    line-height:1.25;
    font-weight:700;
}

.product-days{
    font-size:15px;
    font-weight:700;
    margin-top:7px;
}

.product-profit{
    font-size:15px;
    margin-top:6px;
    color:#fff;
}

.product-profit span{
    color:#ed5555;
    font-weight:700;
}

.product-range{
    font-size:12px;
    color:#ed5555;
    margin-top:7px;
    white-space:nowrap;
}

.product-right{
    width:20%;
    display:flex;
    justify-content:center;
    align-items:center;
}

.progress{
    width:62px;
    height:62px;
    border-radius:50%;
    border:5px solid #fff;
    border-right-color:#eb6262;
    border-bottom-color:#eb6262;
    display:flex;
    justify-content:center;
    align-items:center;
    color:#fff;
    font-size:15px;
    font-weight:700;
}


/* POPUP */

.modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.55);
    z-index:9999;
    align-items:center;
    justify-content:center;
    padding:20px;
}

.modal.show{
    display:flex;
}

.modal-box{
    width:100%;
    max-width:390px;
    background:#fff;
    border-radius:22px;
    padding:22px;
    box-shadow:0 10px 35px rgba(0,0,0,.25);
}

.modal-title{
    font-size:18px;
    font-weight:700;
    color:#08765b;
    text-align:center;
}

.modal-plan{
    text-align:center;
    color:#777;
    font-size:12px;
    margin-top:5px;
    margin-bottom:18px;
}

.amount-label{
    font-size:12px;
    color:#444;
    margin-bottom:6px;
}

.amount-input{
    width:100%;
    height:45px;
    border:2px solid #ddd;
    border-radius:12px;
    padding:0 12px;
    font-size:14px;
    outline:none;
}

.amount-input:focus{
    border-color:#08765b;
}

.modal-buttons{
    display:flex;
    gap:10px;
    margin-top:15px;
}

.modal-btn{
    flex:1;
    height:42px;
    border:0;
    border-radius:12px;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
}

.cancel-btn{
    background:#eee;
    color:#444;
}

.confirm-btn{
    background:#08765b;
    color:#fff;
}


/* SMALL SCREENS */

@media(max-width:380px){

    .header{
        height:62px;
    }

    .header-title{
        font-size:19px;
    }

    .records{
        font-size:13px;
        top:23px;
    }

    .back{
        left:16px;
        font-size:34px;
    }

    .hero{
        height:315px;
    }

    .earnings-card{
        height:140px;
        border-radius:27px;
    }

    .amount{
        font-size:23px;
        margin-bottom:13px;
    }

    .label{
        font-size:13px;
    }

    .storage{
        height:62px;
        margin-top:22px;
        gap:14px;
    }

    .storage-title{
        font-size:15px;
    }

    .dot{
        width:17px;
        height:17px;
    }

    .product{
        min-height:125px;
        padding:13px 8px;
        border-radius:25px;
    }

    .days-box{
        width:60px;
        height:73px;
    }

    .days-number{
        font-size:23px;
    }

    .days-text{
        font-size:11px;
    }

    .product-name{
        font-size:14px;
    }

    .product-days{
        font-size:13px;
    }

    .product-profit{
        font-size:13px;
    }

    .product-range{
        font-size:11px;
    }

    .progress{
        width:53px;
        height:53px;
        font-size:13px;
    }

    .modal-title{
        font-size:16px;
    }

    .modal-plan{
        font-size:11px;
    }

    .amount-label{
        font-size:11px;
    }

    .amount-input{
        font-size:13px;
    }

    .modal-btn{
        font-size:12px;
    }

}

</style>
</head>

<body>

<div class="app">


<!-- HEADER -->

<header class="header">

    <a href="#" class="back">
        &#8249;
    </a>

    <div class="header-title">
        Wealth appreciation
    </div>

    <a href="#" class="records">
        records
    </a>

</header>


<!-- HERO -->

<div class="hero">

<img
    alt="Wealth appreciation"
    src="wealthn.jpeg"
>

</div>


<!-- EARNINGS -->

<div class="earnings-card">

    <div class="earning">

        <div class="amount">
            0.00
        </div>

        <div class="label">
            Today's earnings
        </div>

    </div>

    <div class="earning">

        <div class="amount">
            0.00
        </div>

        <div class="label">
            Amount
        </div>

    </div>

</div>


<!-- STORAGE -->

<div class="storage">

    <div class="dot"></div>

    <div class="storage-title">
        Storage period
    </div>

    <div class="dot"></div>

</div>


<!-- PRODUCTS -->

<div class="products">


    <!-- 5 DAYS -->

    <div
        class="product"
        onclick="openProduct(
            'SNAP Financial Products – 5 Day',
            '5 Days',
            '4.3%',
            '1000.00 ~ 5000000',
            '75%'
        )"
    >

        <div class="product-left">

            <div class="days-box">

                <div class="days-number">
                    5
                </div>

                <div class="days-text">
                    Days
                </div>

            </div>

        </div>

        <div class="product-info">

            <div class="product-name">
                SNAP Financial<br>
                Products – 5 Days
            </div>

            <div class="product-profit">
                Profit <span>4.3%</span>
            </div>

            <div class="product-range">
                1000.00~5000000
            </div>

        </div>

        <div class="product-right">

            <div class="progress">
                75%
            </div>

        </div>

    </div>


    <!-- 10 DAYS -->

    <div
        class="product"
        onclick="openProduct(
            'SNAP Financial Center – 10 Days',
            '10 Days',
            '4.85%',
            '2000.00 ~ 10000000',
            '90%'
        )"
    >

        <div class="product-left">

            <div class="days-box">

                <div class="days-number">
                    10
                </div>

                <div class="days-text">
                    Days
                </div>

            </div>

        </div>

        <div class="product-info">

            <div class="product-name">
                SNAP Financial Center<br>
                – 10 Days
            </div>

            <div class="product-profit">
                Profit <span>4.85%</span>
            </div>

            <div class="product-range">
                2000.00~10000000
            </div>

        </div>

        <div class="product-right">

            <div class="progress">
                90%
            </div>

        </div>

    </div>


    <!-- 28 DAYS -->

    <div
        class="product"
        onclick="openProduct(
            'SNAP Financial Center – 28 Days',
            '28 Days',
            '6.68%',
            '2000.00 ~ 10000000',
            '85%'
        )"
    >

        <div class="product-left">

            <div class="days-box">

                <div class="days-number">
                    28
                </div>

                <div class="days-text">
                    Days
                </div>

            </div>

        </div>

        <div class="product-info">

            <div class="product-name">
                SNAP Financial Center<br>
                – 28 Days
            </div>

            <div class="product-profit">
                Profit <span>6.68%</span>
            </div>

            <div class="product-range">
                2000.00~10000000
            </div>

        </div>

        <div class="product-right">

            <div class="progress">
                85%
            </div>

        </div>

    </div>


    <!-- 50 DAYS -->

    <div
        class="product"
        onclick="openProduct(
            'SNAP Financial Center – 50 Days',
            '50 Days',
            '8.9%',
            '2000.00 ~ 10000000',
            '60%'
        )"
    >

        <div class="product-left">

            <div class="days-box">

                <div class="days-number">
                    50
                </div>

                <div class="days-text">
                    Days
                </div>

            </div>

        </div>

        <div class="product-info">

            <div class="product-name">
                SNAP Financial Center<br>
                – 50 Days
            </div>

            <div class="product-profit">
                Profit <span>8.9%</span>
            </div>

            <div class="product-range">
                2000.00~10000000
            </div>

        </div>

        <div class="product-right">

            <div class="progress">
                60%
            </div>

        </div>

    </div>


</div>


</div>


<!-- POPUP -->

<div class="modal" id="productModal">

    <div class="modal-box">

        <div class="modal-title" id="modalTitle">
            Product
        </div>

        <div class="modal-plan" id="modalPlan">
            5 Days
        </div>

        <div class="amount-label">
            Enter Amount
        </div>

        <input
            type="number"
            id="amountInput"
            class="amount-input"
            placeholder="Enter amount"
            min="0"
            step="0.01"
        >

        <div class="modal-buttons">

            <button
                type="button"
                class="modal-btn cancel-btn"
                onclick="closeProduct()"
            >
                Cancel
            </button>

            <button
                type="button"
                class="modal-btn confirm-btn"
                onclick="confirmProduct()"
            >
                Continue
            </button>

        </div>

    </div>

</div>


<script>

let selectedProduct = "";
let selectedDays = "";
let selectedProfit = "";
let selectedRange = "";
let selectedProgress = "";


function openProduct(title,days,profit,range,progress){

    selectedProduct = title;
    selectedDays = days;
    selectedProfit = profit;
    selectedRange = range;
    selectedProgress = progress;

    document.getElementById("modalTitle").textContent = title;

    document.getElementById("modalPlan").textContent =
        days + " • Profit " + profit;

    document.getElementById("amountInput").value = "";

    document
        .getElementById("productModal")
        .classList.add("show");

    setTimeout(function(){

        document
            .getElementById("amountInput")
            .focus();

    },100);
}


function closeProduct(){

    document
        .getElementById("productModal")
        .classList.remove("show");

}


function confirmProduct(){

    const amount =
        document.getElementById("amountInput").value.trim();

    if(amount === ""){

        alert("Please enter an amount.");

        return;

    }

    if(Number(amount) <= 0){

        alert("Please enter a valid amount.");

        return;

    }

    alert(
        "Selected: " +
        selectedProduct +
        "\nAmount: " +
        amount
    );

}


document
    .getElementById("productModal")
    .addEventListener("click",function(e){

        if(e.target === this){

            closeProduct();

        }

    });

</script>

</body>
</html>