.main_title {
    margin-top: 100px;
    display: flex;
    justify-content: space-evenly;
}

.ranking_card{
    margin-top: 100px;
}

.cards{
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.ranking_text{
    display: flex;
    position: absolute;
    width: 50px;
    height: 40px;
    background-color: rgb(243, 220, 231);
    font-size: 22px;
    opacity: 0.8;
    align-items: center;
    justify-content: center;
    border-bottom-right-radius:  0.5em;
}

.card-img-top{
    height: 200px;
    background-color: gainsboro;
}

.card_top{
    display: flex;
    justify-content: space-between;
}

.bi-heart{

    margin-bottom: 10px;
}

.card_info{
    display: flex;
    flex-direction: column;
    margin-top: 5px;
}

.card_bottom{
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.Source{
    display: flex;
    margin-left: 10px;
    width: 170px;
    height: 35px;
    background-color: lightblue;
    align-items: center;
    border-radius: 0.9em;
}

.Source_img{
    margin-left: 10px;
    background-color: gainsboro;
    width: 28px;       /* 원하는 크기 */
    height: 28px;
    border-radius: 50%; /* 핵심! 원형으로 만들기 */
    object-fit: cover;  /* 이미지 비율 유지하면서 꽉 채움 */
    order: 2px solid #ccc; /* 원 테두리 (선택사항) */
}

.source_market_name{
    margin-left: 10px;
}


/* 티커 전체 배경 및 높이 설정 */
.ticker_wrapper {
    width: 100%;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    overflow-x: hidden; /* 가로만 클리핑 - 줌 시 세로 잘림 방지 */
    overflow-y: visible;
    padding: 10px 0;
    min-height: 40px;   /* 줌 배율이 높아도 영역 확보 */
    display: flex;
    align-items: center;
}

.ticker_container {
    display: flex;
    width: 100%;
    overflow: hidden;   /* 실제 클리핑은 여기서 */
}

.ticker_items {
    display: flex;
    white-space: nowrap; /* 줄바꿈 방지 */
    flex-shrink: 0;
    animation: ticker_rolling linear infinite; /* 속도는 서버에서 inline style로 주입 */
}

/* 마우스 올리면 일시정지 (UX 향상) */
.ticker_wrapper:hover .ticker_items {
    animation-play-state: paused;
}

.ticker_item {
    padding: 0 50px; /* 아이템 간 간격 */
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 무한 루프 애니메이션 */
@keyframes ticker_rolling {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}