.rank-modal{
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 322px;
    height: 521px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.rank-card{
    position: relative;
    width: 268px;
    height: 465px;
    background: rgba(255,255,255,.9);
    border: 3px solid #fff;
    border-radius: 29px;
    backdrop-filter: blur(3.23201px);
    box-sizing: border-box;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 45px 20px 20px;
    margin-top: 85px;
}

/* 상단 캐릭터 그래픽 */
.rank-graphic{
    position: absolute;
    width: 268px;
    height: 130px;
    object-fit: contain;
    top: -95px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 2;
}

/* 섹션 타이틀 */
.rank-title{
    width: 228px;
    height: 18px;
    font-family: DINosaur;
    font-weight: 900;
    font-size: 14px;
    line-height: 18px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #000;
    text-align: center;
    margin-bottom: 11px;
    flex-shrink: 0;
}
.rank-title.yours {
    margin-top: 24px;
    margin-bottom: 10px;
}

/* 랭킹 리스트 */
.rank-list{
    width: 228px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.rank-row, .score-row{
    width: 228px;
    height: 36px;
    background: #fff;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 0 4px;
    gap: 3px;
    flex-shrink: 0;
}
.rank-row:not(:last-child){
    margin-bottom: 8px;
}
.rank-left{
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 118px;
}
.rank-medal{
    width: 28px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rank-medal img{
    width: 28px;
    height: 32px;
    object-fit: contain;
}

.rank-avatar{
    width: 28px;
    height: 28px;
    border: 1px solid #F0F0F0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}
.rank-avatar img{
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rank-name{
    width: 86px;
    height: 28px;
    font-family: DINosaur;
    font-weight: 900;
    font-size: 12px;
    line-height: 14px;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #000;
    display: flex;
    align-items: center;
}
.rank-score{
    width: 60px;
    height: 28px;
    text-align: right;
    font-family: DINosaur;
    font-weight: 900;
    font-size: 12px;
    line-height: 14px;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* THIS RUN / BEST RUN 태그 */
.tag{
    width: 228px;
    height: 17px;
    background: #CACACA;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px 0px 2px;
    gap: 10px;
    margin-bottom: 4px;
    flex-shrink: 0;
}
.tag span{
    font-family: DINosaur;
    font-weight: 900;
    font-size: 10px;
    line-height: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
}
.tag.best{
    margin-top: 18px;
}

/* 내 점수 행 */
.score-row{
    width: 228px;
    height: 36px;
    background: #fff;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 0 4px;
    gap: 3px;
    flex-shrink: 0;
}
.score-row.best{
    margin-bottom: 0;
}

.rank-badge{
    width: 20px;
    height: 20px;
    border-radius: 10000px;
    background: #E7E7E7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: DINosaur;
    font-weight: 900;
    font-size: 10px;
    line-height: 12px;
    color: #7C7C7C;
    padding: 0;
}

/* SHARE 버튼 */
.share-btn{
    position: absolute;
    width: 170px;
    height: 68px;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFE718;
    border: 3.4px solid #fff;
    box-shadow: inset 0 -12px 6px #F4A700;
    border-radius: 18px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.share-btn .label{
    width: 77px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    font-family: DINosaur;
    font-weight: 900;
    font-size: 24px;
    letter-spacing: .03em;
    color: #fff;
    text-shadow: 0 0 5px #F4C700;
}

/* 버튼 컨테이너: 시안처럼 가운데 정렬, 폭은 자동 */
.button-container {
    position: absolute;
    left: 50%;
    bottom: -100px;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    /* width: 222px;  ← 고정폭 제거 */
    z-index: 200;
}

/* 어뷰징 차단 화면의 버튼 컨테이너를 GAME START 버튼과 같은 위치로 */
#anticheatOverlay .button-container {
    bottom: auto;
    top: 72.7%;
    height: 68px;
}

/* 모바일에서 어뷰징 차단 화면의 버튼을 일본어 텍스트와 충분히 떨어지게 */
@media (max-width: 767px) {
    #anticheatOverlay .button-container {
        top: calc(50% + 200px) !important;
    }
}

/* 버튼 컨테이너: 시안처럼 가운데 정렬, 폭은 자동 */
.button-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -120px;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    z-index: 200;
}

/* 공통 버튼 – 시안 수치 */
.action-btn {
    box-sizing: border-box;
    height: 42px;
    padding: 0;
    width: auto;
    border: none;
    border-radius: 5px;
    position: relative;
    cursor: pointer;
    transition: transform .15s ease;
    white-space: nowrap;
    text-indent: -9999px; /* 텍스트 숨김 */
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(3.937500238418579px);
    -webkit-backdrop-filter: blur(3.937500238418579px);
    border-radius: 21px;
    z-index: -1;
}

/* 이중테두리처럼 보이던 링 제거 */
.action-btn::after { content: none; }

/* hover 반응 제거 */

/* 각 버튼별 이미지 설정 */
.retry-btn {
    width: 96px;
    background-image: url('/images/buttons/btn_retry.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.go-home-btn {
    width: 120px;
    background-image: url('/images/buttons/btn_gohome.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.go-home-btn::before {
    left: 2px;
    right: 2px;
}

@media (orientation: landscape) and (pointer: coarse) {
    .rank-modal{
        position: fixed;
        top: -10%;
        bottom: 0;
        width: 100%;
        left: 0;
        right: 0;
        transform: none;
        height: 100%;
        scale: 0.8;
    }

    .rank-card {
        display: flex;
        flex-direction: row;
        height: 100%;
        gap: 32px;
        background: none;
        justify-content: center;
        width: 100%;
        border: none;
        backdrop-filter: none;
        align-items: center;
        margin-top: 0;
    }

    .rank-section-top {
        background: rgba(255,255,255,.9);
        border: 3px solid #fff;
        border-radius: 29px;
        backdrop-filter: blur(3.23201px);
        box-sizing: border-box;
        overflow: visible;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 45px 20px 20px;
        margin-top: 70px;
    }

    .rank-section-me {
        background: rgba(255,255,255,.9);
        border: 3px solid #fff;
        border-radius: 29px;
        backdrop-filter: blur(3.23201px);
        box-sizing: border-box;
        overflow: visible;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px 20px 40px 20px;

    }

    .rank-title.yours {
        margin-top: 0;
        margin-bottom: 10px;
    }

    .button-container {
        bottom: -90px;
    }

    .share-btn{
        width: 136px;
        height: 47px;
        bottom: -20px;
    }

    .share-btn .label {
        font-size: 18px;
    }
}



