<style>

/* =========================================================
   MAIN CONTAINER
========================================================= */

.market-widget {
    width: 100%;
    box-sizing: border-box;

    background: #06151e;

    border-radius: 16px;

    padding: 18px 20px;

    color: #ffffff;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    box-shadow:
        0 15px 35px rgba(0,0,0,0.18);

    overflow: hidden;
}


/* =========================================================
   HEADER
========================================================= */

.market-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    padding-bottom: 15px;

    border-bottom:
        1px solid rgba(255,255,255,0.10);
}


.market-title {

    display: flex;

    align-items: center;

    gap: 10px;

    font-size: 17px;

    font-weight: 700;

    letter-spacing: 0.2px;

    white-space: nowrap;
}


.market-dot {

    width: 10px;

    height: 10px;

    background: #16df78;

    border-radius: 50%;

    box-shadow:
        0 0 12px rgba(22,223,120,0.55);

    flex-shrink: 0;
}


.market-status {

    display: flex;

    align-items: center;

    gap: 10px;

    font-size: 13px;

    color: #8ea5b6;

    white-space: nowrap;
}


.market-status .live {

    color: #16df78;

    font-weight: 700;
}


.status-dot {

    display: inline-block;

    width: 6px;

    height: 6px;

    background: #16df78;

    border-radius: 50%;

    margin-right: 5px;
}


/* =========================================================
   CARDS AREA
========================================================= */

.market-cards {

    display: grid;

    grid-template-columns:
        repeat(8, minmax(0, 1fr));

    gap: 12px;

    padding-top: 15px;
}


/* =========================================================
   CARD
========================================================= */

.market-card {

    min-width: 0;

    background: #101f28;

    border:
        1px solid #233845;

    border-radius: 10px;

    padding: 14px 16px;

    box-sizing: border-box;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}


.market-card:hover {

    transform:
        translateY(-2px);

    border-color:
        #355364;

    background:
        #132631;
}


/* =========================================================
   CARD TOP
========================================================= */

.market-card-top {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 8px;

    margin-bottom: 8px;
}


.market-name {

    font-size: 15px;

    font-weight: 700;

    color: #f4f7f9;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.market-exchange {

    font-size: 12px;

    color: #66859d;

    white-space: nowrap;
}


/* =========================================================
   PRICE
========================================================= */

.market-price {

    font-size: 23px;

    line-height: 1.2;

    font-weight: 800;

    color: #ffffff;

    white-space: nowrap;

    margin-bottom: 9px;
}


/* =========================================================
   CHANGE
========================================================= */

.market-change {

    font-size: 14px;

    font-weight: 600;

    white-space: nowrap;
}


.market-change.positive {

    color: #20df7a;
}


.market-change.negative {

    color: #ff5b65;
}


.market-change.neutral {

    color: #9aaab5;
}


/* =========================================================
   LOADING
========================================================= */

.market-loading {

    color: #7892a4;

    animation:
        marketPulse 1.2s infinite;
}


@keyframes marketPulse {

    0% {
        opacity: 0.45;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.45;
    }

}


/* =========================================================
   ERROR
========================================================= */

.market-error {

    color: #ff626b;

    font-size: 13px;
}


/* =========================================================
   MOBILE / TABLET
========================================================= */

@media (max-width: 1200px) {

    .market-cards {

        grid-template-columns:
            repeat(4, minmax(0, 1fr));

    }

}


@media (max-width: 700px) {

    .market-widget {

        padding: 15px;

        border-radius: 12px;
    }


    .market-header {

        align-items: flex-start;

    }


    .market-title {

        font-size: 15px;

    }


    .market-status {

        font-size: 11px;

    }


    .market-cards {

        display: flex;

        overflow-x: auto;

        gap: 10px;

        padding-bottom: 5px;

        scroll-snap-type: x mandatory;

        scrollbar-width: thin;
    }


    .market-card {

        flex:
            0 0 190px;

        scroll-snap-align: start;

    }

}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .market-header {

        flex-direction: column;

        gap: 8px;

    }


    .market-status {

        width: 100%;

        justify-content: flex-start;

    }

}

</style>