/* ── Site/Gacha Ranking Page Stylesheet ── */

.ranking-page-wrapper {
    background-image: url('../../assets/frontend/images/background_rank.png');
    background-size: cover;
    background-position: top left;
    background-repeat: no-repeat;
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 15px 50px 15px;
    margin-top: 0px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
}

.ranking-container {
    width: 100%;
    max-width: 768px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ── Ranking Card ── */
.ranking-card {
    background-image: url('../../assets/frontend/images/background_ranking.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    padding: 20px 15px;
    position: relative;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-sizing: border-box;
}

/* ── Ribbon Badge ── */
.rank-ribbon {
    position: absolute;
    top: -4px;
    left: 12px;
    width: 54px;
    height: auto;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* ── Card Header ── */
.rank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-left: 64px; /* Give room for ribbon */
    box-sizing: border-box;
}

.rank-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rank-title {
    font-size: 26px;
    font-weight: 900;
    color: #111;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.rank-rating-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-star-icon,
.rating-star-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.rating-star-icon.gray {
    color: #E0E0E0;
}

.rating-text {
    font-size: 16px;
    font-weight: 700;
    color: #444;
}

.rating-text span {
    font-size: 20px;
    font-weight: 900;
    color: #111;
}

/* ── Score Badge (Pink) ── */
.rank-score-badge {
    background-image: url('../../assets/frontend/images/scrore_ranking.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 82px;
    height: 82px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    padding-bottom: 8px;
    padding-right: 4px;
    box-sizing: border-box;
}

.score-label {
    font-size: 11px;
    font-weight: 800;
    color: #FFF;
    line-height: 1;
    margin-bottom: 2px;
    letter-spacing: -0.02em;
}

.score-value {
    font-size: 22px;
    font-weight: 900;
    color: #FFE600;
    line-height: 1;
}

/* ── Banner Image ── */
.rank-banner-wrapper {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.rank-banner {
    width: 100%;
    max-width: 440px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: cover;
}
.rank-table-header img {
    width: 22px !important;
}

/* ── Feature Boxes ── */
.rank-features-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.feature-box {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    box-sizing: border-box;
    min-height: 64px;
}

.feature-box.feature-yellow {
    background-image: url('../../assets/frontend/images/background_yellow_ranking.png');
}

.feature-box.feature-pink {
    background-image: url('../../assets/frontend/images/background_pink_ranking.png');
}

.feature-box.feature-green {
    background-image: url('../../assets/frontend/images/background_green_ranking.png');
}

.feature-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    object-fit: contain;
}

.feature-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.feature-label {
    font-size: 12px;
    font-weight: 800;
    color: #222;
    margin-bottom: 2px;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.feature-value {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
}

.feature-value span {
    font-size: 26px;
    font-weight: 700;
}

/* ── Table Grid ── */
.rank-table {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #CCA070;
    box-sizing: border-box;
}

.rank-table-col {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #CCA070;
}

.rank-table-col:last-child {
    border-right: none;
}

.rank-table-header {
    background: #FFF1BD;
    padding: 8px 4px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    border-bottom: 1px solid #CCA070;
    height: 42px;
    box-sizing: border-box;
}

.rank-rank-table-header-icon, .rank-table-header-icon {
    width: 15px;
    height: 15px;
    object-fit: contain;
}

.rank-rank-table-header-title, .rank-table-header-title {
    font-size: 12px;
    font-weight: 800;
    color: #3E2723;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.rank-table-body {
    background: #FFF;
    padding: 8px 4px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    min-height: 52px;
    box-sizing: border-box;
}

.rank-table-value {
    font-size: 13px;
    font-weight: 900;
    color: #D84315;
    line-height: 1.3;
    margin: 0;
    white-space: pre-line;
}

/* ── CTA Button ── */
.rank-cta-btn {
    width: 100%;
    background: linear-gradient(180deg, #FF4545 0%, #D80000 100%);
    border: 2px solid #FFF;
    border-radius: 30px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rank-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.rank-cta-text {
    font-size: 22px;
    font-weight: 900;
    color: #FFF;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.rank-cta-icon-circle {
    width: 24px;
    height: 24px;
    background: #FFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rank-cta-icon-circle i {
    color: #D80000;
    font-size: 12px;
    margin-left: 1px;
}

/* ── Responsive Viewports ── */
@media (max-width: 768px) {
    .ranking-page-wrapper {
        padding: 10px 8px 30px 8px;
    }
}

@media (max-width: 480px) {
    .ranking-card {
        padding: 15px 10px;
        gap: 12px;
    }
    .rank-ribbon {
        width: 44px;
        left: 8px;
    }
    .rank-header {
        padding-left: 48px;
    }
    .rank-title {
        font-size: 20px;
    }
    .rank-score-badge {
        width: 64px;
        height: 64px;
    }
    .score-value {
        font-size: 16px;
    }
    .rating-star-icon,
    .rating-star-img {
        width: 14px;
        height: 14px;
    }
    .rating-text {
        font-size: 13px;
    }
    .rating-text span {
        font-size: 15px;
    }
    .feature-box {
        padding: 6px 8px;
        gap: 6px;
        min-height: 52px;
    }
    .feature-icon {
        width: 18px;
        height: 18px;
    }
    .feature-label {
        font-size: 9px;
    }
    .feature-value {
        font-size: 20px;
    }
    .feature-value span {
        font-size: 18px;
    }
    .rank-table-header {
        padding: 4px 1px;
        height: 50px;
        flex-direction: column;
        gap: 3px;
        justify-content: center;
    }
    .rank-table-header img,
    .rank-rank-table-header-icon,
    .rank-table-header-icon {
        width: 15px !important;
        height: 15px !important;
        object-fit: contain;
    }
    .rank-rank-table-header-title,
    .rank-table-header-title {
        font-size: 11px;
        letter-spacing: -0.05em;
    }
    .rank-table-body {
        padding: 6px 2px;
        min-height: 46px;
    }
    .rank-table-value {
        font-size: 10px;
    }
    .rank-cta-text {
        font-size: 16px;
    }
    .rank-cta-icon-circle {
        width: 18px;
        height: 18px;
    }
    .rank-cta-icon-circle i {
        font-size: 9px;
    }
}

/* ── Collection Valuation Page Styles ── */
.valuation-page-wrapper {
    background-color: #000000;
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 25px 15px 50px 15px;
    box-sizing: border-box;
}

.valuation-container {
    width: 100%;
    max-width: 768px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.valuation-title-section {
    text-align: center;
    margin-bottom: 5px;
}

.valuation-main-title {
    font-size: 24px;
    font-weight: 800;
    color: #FFE600;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.valuation-subtitle {
    font-size: 18px;
    color: #FFFFFF;
    margin: 0;
    font-weight: 500;
}

/* .valuation-asset-card {
    background: linear-gradient(135deg, #0d1b2a, #030712);
    border: 1.5px solid #1e3a8a;
    box-shadow: 0 0 15px rgba(30, 58, 138, 0.4);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
} */

.valuation-asset-card {
    background: linear-gradient(135deg,#0b1928 0%,#02060d 100%);
    border: 1.5px solid #6095d4;
    box-shadow:inset 0 0 28px rgba(28, 96, 170, 0.12), 0 0 18px rgba(30, 100, 220, 0.28);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.valuation-asset-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.valuation-asset-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.valuation-asset-label {
    font-size: 20px;
    color: #FFFFFF;
    font-weight: 700;
}

/* .valuation-asset-price {
    font-size: 38px;
    font-weight: 900;
    color: #FF3333;
    line-height: 1;
    display: flex;
    align-items: baseline;
}

.valuation-asset-price .yen-symbol {
    font-size: 36px;
    margin-right: 2px;
    color: #FF3333;
} */

.valuation-asset-price {
    font-size: 46px;
    font-weight: 900;
    color: #FF3333;
    line-height: 1;
    display: flex;
    align-items: baseline;
    letter-spacing: -1px;
}

.valuation-asset-price .yen-symbol {
    font-size: 42px;
    margin-right: 2px;
    color: #FF3333;
}

.valuation-asset-right {
    display: flex;
    align-items: flex-start;
}

.valuation-trend-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid #00FF00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.8);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 14px;
    color: #FFFFFF;
    font-weight: 800;
}

.valuation-trend-badge .trend-percent,
.valuation-trend-badge .trend-svg {
    color: #00FF00;
}

.valuation-chart-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* .valuation-chart-area {
    display: flex;
    position: relative;
    height: 200px;
    width: 100%;
} */

.valuation-chart-area {
    display: flex;
    position: relative;
    height: 240px;
    width: 100%;
}

.chart-y-axis {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 10px;
    color: #9CA3AF;
    width: 60px;
}

.chart-bars-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 100%;
    width: calc(100% - 65px);
    padding-bottom: 2px;
    border-bottom: 1.5px solid #4b5563;
    background-image: linear-gradient(to bottom, rgba(75, 85, 99, 0.15) 1px, transparent 1px);
    background-size: 100% 40px;
}

.chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    margin: 0 6px;
}

.chart-bar-track {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: flex-end;
}

.chart-bar {
    width: 100%;
    background-image: url("../../assets/frontend/images/chart_line_column.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border-radius: 4px 4px 0 0;
}

.chart-x-axis {
    display: flex;
    justify-content: space-between;
    width: calc(100% - 65px);
    font-size: 10px;
    color: #9CA3AF;
    padding-top: 5px;
}

.chart-x-axis .x-label {
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

.valuation-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.valuation-crown-title-svg {
    filter: drop-shadow(0 0 5px rgba(255, 230, 0, 0.5));
}

.valuation-section-title {
    font-size: 25px;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0;
}

.valuation-cards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.valuation-item-card {
    display: flex;
    align-items: center;
    background: #030712;
    border-radius: 12px;
    padding: 12px 16px;
    box-sizing: border-box;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
}

.item-rank-badge-spacer {
    width: 14%;
    flex-shrink: 0;
}

.item-rank-badge {
    width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.item-rank-crown {
    margin-bottom: 2px;
}

.item-rank-badge .rank-number {
    font-size: 60px;
    font-weight: 900;
    color: #FFFFFF;
    line-height: 1;
}

.item-rank-badge .rank-suffix {
    font-size: 36px;
    font-weight: 700;
}

.item-card-image-wrapper {
    width: 90px;
    height: 126px;
    border-radius: 4px;
    overflow: hidden;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    flex-shrink: 0;
}

.item-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* .item-card-details {
    flex: 1;
    margin-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
} */

.item-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}

/* .item-card-price {
    font-size: 32px;
    font-weight: 900;
    color: #EF4444;
    align-self: flex-end;
    margin-right: 60px;
} */

.item-card-details {
    flex: 1;
    margin-left: 16px;
    padding-right: 48px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.item-card-price {
    font-size: 32px;
    font-weight: 900;
    color: #EF4444;
    align-self: flex-end;
    margin-right: 0;
}

/* ── Mobile Queries for Valuation ── */
@media (max-width: 480px) {
    .valuation-page-wrapper {
        padding: 15px 10px 40px 10px;
    }
    
    .valuation-container {
        gap: 15px;
    }
    
    .valuation-main-title {
        font-size: 19px;
        margin-bottom: 6px;
    }
    
    .valuation-subtitle {
        font-size: 14px;
    }
    
    .valuation-asset-card {
        padding: 16px;
        gap: 16px;
    }
    
    .valuation-asset-price {
        font-size: 30px;
    }
    
    .valuation-asset-price .yen-symbol {
        font-size: 22px;
    }
    
    .valuation-trend-badge {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .valuation-chart-area {
        height: 150px;
    }
    
    .chart-y-axis {
        width: 55px;
        font-size: 8.5px;
    }
    
    .chart-bars-container {
        width: calc(100% - 60px);
        background-size: 100% 30px;
    }
    
    .chart-x-axis {
        width: calc(100% - 60px);
        font-size: 8.5px;
    }
    
    .chart-x-axis .x-label {
        margin-top: 5px;
        display: flex;
        flex-direction: column;
        align-items: center;
        line-height: 1.1;
    }
    
    .chart-x-axis .x-label span {
        display: block;
    }
    
    .chart-col {
        margin: 0 3px;
    }
    
    .valuation-section-title {
        font-size: 17px;
    }
    
    .valuation-crown-title-svg {
        width: 22px;
        height: 22px;
    }
    
    .valuation-item-card {
        padding: 8px 10px;
        height: 88px;
    }
    
    .item-card-image-wrapper {
        width: 40px;
        height: 56px;
        margin-left: 5px;
        flex-shrink: 0;
    }
    
    .item-rank-badge {
        max-width: 60px;
    }
    
    .item-rank-badge .rank-number {
        font-size: 32px;
    }
    
    .item-rank-badge .rank-suffix {
        font-size: 20px;
    }
    
    .item-card-details {
        margin-left: 10px;
    }
    
    .item-card-name {
        font-size: 13px;
    }
    
    .item-card-price {
        font-size: 20px;
        margin-right: 40px;
    }

}

.valuation-page-wrapper {
    padding-bottom: 24px !important;
}

.valuation-page-wrapper + .site-background {
    margin-top: 0 !important;
}

.valuation-page-wrapper + .site-background .main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.valuation-page-wrapper + .site-background .padding-main {
    padding-top: 0 !important;
}

.valuation-page-wrapper + .site-background .hight-light {
    margin-top: 0 !important;
}

.valuation-trend-badge.is-unknown {
    border-color: #64748B;
    box-shadow:
        0 0 10px rgba(100, 116, 139, 0.4);
}

.valuation-trend-badge.is-unknown .trend-percent,
.valuation-trend-badge.is-unknown .trend-svg {
    color: #94A3B8;
}

/* ── Collection Valuation: extra states ── */
.valuation-trend-badge.is-down {
    border-color: #EF4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
}

.valuation-trend-badge.is-down .trend-percent,
.valuation-trend-badge.is-down .trend-svg {
    color: #EF4444;
}

.valuation-trend-badge.is-down .trend-svg {
    transform: rotate(180deg);
}

.valuation-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    border: 1px dashed #334155;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.5);
}

.valuation-chart-empty p {
    margin: 0;
    padding: 0 20px;
    text-align: center;
    font-size: 15px;
    color: #94A3B8;
    line-height: 1.7;
}

@media (max-width: 480px) {
    .valuation-chart-empty {
        min-height: 100px;
    }
}



@media (max-width: 480px) {
    .valuation-page-wrapper {
        padding: 15px 10px 40px;
    }

    .valuation-container {
        gap: 15px;
    }

    .valuation-main-title {
        font-size: 19px;
        margin-bottom: 6px;
    }

    .valuation-subtitle {
        font-size: 14px;
    }

    .valuation-asset-card {
        padding: 16px;
        gap: 18px;

        border-radius: 16px;
    }

    .valuation-asset-label {
        font-size: 16px;
    }

    .valuation-asset-price {
        font-size: 34px;
    }

    .valuation-asset-price .yen-symbol {
        font-size: 30px;
    }

    .valuation-trend-badge {
        padding: 4px 9px;
        font-size: 11px;
    }

    .valuation-chart-area {
        height: 180px;
    }

    .chart-y-axis {
        width: 55px;
        font-size: 8.5px;
    }

    .chart-bars-container {
        width: calc(100% - 60px);

        background-size:
            100% 36px;
    }

    .chart-x-axis {
        width: calc(100% - 60px);

        font-size: 8.5px;
    }

    .chart-x-axis .x-label {
        margin-top: 5px;

        display: block;

        line-height: 1;
    }

    .chart-col {
        margin: 0 3px;
    }

    .valuation-section-title {
        font-size: 18px;
    }

    .valuation-crown-title-svg {
        width: 24px;
        height: auto;
    }

    .valuation-item-card {
        padding: 8px 10px;
        height: 88px;
    }

    .item-card-image-wrapper {
        width: 40px;
        height: 56px;
        margin-left: 5px;
    }

    .item-card-details {
        margin-left: 10px;
        padding-right: 30px;
    }

    .item-card-name {
        font-size: 13px;
    }

    .item-card-price {
        font-size: 20px;
        margin-right: 0;
    }
}
