.main-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
}

@keyframes tilt-shaking {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

.filters {
    flex: 1 1 300px;
    min-width: 350px;
}

#leaderboard-and-pagination {
    flex: 1 4 700px;
    margin-top: -25px;
}

#leaderboard-content {
    container-type: inline-size;
}

.announcement {
    min-width: 330px;
}


.part-dropdown {
    object-fit: contain;
    width: clamp(30px, 6vw, 50px);
    height: clamp(30px, 6vw, 50px);
}

.rune-dropdown {
    object-fit: contain;
    width: clamp(30px, 6vw, 50px);
    height: clamp(30px, 6vw, 50px);
}
.icon-text {
    flex-direction: column;
}

@media screen and (max-width: 768px) {
    .axie-info {
        margin-top: -3px !important;
    }
    .icon-text {
        gap: 0 !important;
        align-items: end;
    }
}

@container (max-width: 650px) {
    .pagination-container {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .pagination-link {
        display: none;
    }

    .pagination-list li:first-child .pagination-link,
    .pagination-list li:last-child .pagination-link,
    .pagination-list .is-current {
        display: inline-block;
    }

    .leaderboard-unit {
        margin-left: -10px;
        margin-right: -10px;
    }
}


@container (min-width: 651px) {
    .pagination-next, .pagination-previous {
        display: none;
    }
}

.pagination-container {
    container-type: inline-size;
    transition: all 0.3s ease;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bulma-scheme-main);
    padding: 10px 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 3;
}


.leaderboard-unit {
    display: block;
    border-bottom: 1px solid var(--bulma-border-leaderboard-unit);
    transition: background-color 0.3s;
}

.leaderboard-unit:hover {
    background-color: var(--bulma-hover-background-leaderboard-unit);
}

.rune-battle-image {
    width: clamp(15px, 3vw, 26px);
    height: clamp(15px, 3vw, 26px);
}

.axie-info {
    align-self: baseline;
    display: flex;
    flex-direction: column;
    margin-top: 5px;
}

.axie-container .rune-battle-image {
    object-fit: contain;
    position: relative;
    align-self: center;
}

.axie-container {
    display: flex;
    align-items: center;
    width: calc(clamp(90px, 20vw, 200px) * 3 / 4);
}

.axie-container .axie-image {
    transform: translate(-20%, -5%) scale(1.2);
    margin-top: -10px;
}

.buttons.era-buttons {
    justify-content: center;
    margin: 8px;
}


.liquid-font {
    font-size: clamp(0.75rem, 2vw, 1rem);
}
.tag.vstar-tag {
    font-size: clamp(0.5rem, 1vw, 0.65rem);
    padding: 0.85em 0.3em 0.85em 0.3em;
    margin-left: 5px;
}
.vstar-tag img {
    width: clamp(10px, 1vw, 16px);
    height: clamp(10px, 1vw, 16px);
}

#dropdownRuneContent .dropdown-item,
#dropdownPartContent .dropdown-item {
    display: none;
    align-items: center;
    padding-bottom: 2px;
    padding-top: 2px;
}

#dropdownRuneContent .dropdown-item:nth-child(-n+10),
#dropdownPartContent .dropdown-item:nth-child(-n+10)  {
    display: flex;
    align-items: center;
    padding-bottom: 2px;
    padding-top: 2px;
}
.full-width-dropdown {
    display: block;
}
.tag.amount-tag {
    font-size: 0.65rem;
}
.tag.rating {
    padding: 0.85em 0.3em 0.85em 0.3em;
    height: 1em;
    font-size: clamp(0.4rem, 1vw, 0.65rem);
}

.chart-container svg {
    width: 100%;
    max-width: 960px;
    height: auto;
    margin: -10px;
}


.noUi-handle:before, .noUi-handle:after {
    display: none;
}

.slider {
    height: 10px;
}

/* noUiSlider ships a near-white track (#FAFAFA), which is the loudest thing on the
   card in dark mode. Bind both sliders to the scheme instead. */
.slider.noUi-target {
    background: var(--bulma-border-weak);
    border: none;
    box-shadow: none;
}

.slider .noUi-connect {
    background: var(--bulma-primary);
}

.slider .noUi-handle {
    height: 15px;
    width: 15px;
    top: -4px;
    right: -9px;
    border: 2px solid var(--bulma-primary);
    background: var(--bulma-scheme-main);
    border-radius: 50%;
    box-shadow: none;
    cursor: grab;
}

.slider .noUi-handle:active {
    cursor: grabbing;
}

.slider .noUi-handle:focus-visible {
    outline: 2px solid var(--bulma-link);
    outline-offset: 2px;
}

.slider-col {
    align-self: center;
}
.top-input {
    min-width: 70px;
}

/* ── Online filter ────────────────────────────────────────────────────────────
   The rail teaches its own scale. Ticks sit exactly 2s apart across the first
   minute (the leading 30% of the track, where the slider steps by 1s) and
   exactly 1m apart across the rest — so the change in step size is legible,
   not just felt. */
.online-filter {
    --online-fine-zone: 30%;   /* share of the track covering 0-60s */
    margin-bottom: 0.75rem;
}

.online-filter__label {
    margin-bottom: 0.4rem;
}

/* --bulma-primary is scheme-invariant (41% lightness in both themes) and drops to
   ~2:1 on a white card. --bulma-primary-on-scheme is the adaptive one: 21% light,
   41% dark. This span is the only place the chosen value is shown, so it has to
   hold up in both. */
.online-filter__value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--bulma-primary-on-scheme);
    letter-spacing: 0.01em;
}

/* "off" is a state, not a magnitude — it never gets the accent colour, so the
   card answers "am I filtering?" without being read. */
.online-filter.is-off .online-filter__value {
    color: var(--bulma-text-weak);
    font-weight: 500;
}

.online-filter__rail {
    position: relative;
}

.online-filter__scale {
    display: flex;
    height: 4px;
    margin-top: 3px;
    color: var(--bulma-text-weak);
    opacity: 0.55;
}

.online-filter__ticks {
    background-image: linear-gradient(90deg, currentColor 0 1px, transparent 1px);
    background-repeat: repeat-x;
}

/* 30 ticks over 0-60s → one every 2 seconds. */
.online-filter__ticks--fine {
    width: var(--online-fine-zone);
    background-size: calc(100% / 30) 100%;
}

/* 19 ticks over 1-20m → one every minute. */
.online-filter__ticks--coarse {
    width: calc(100% - var(--online-fine-zone));
    background-size: calc(100% / 19) 100%;
}

.online-filter__marks {
    position: relative;
    height: 0.95rem;
    margin-top: 1px;
    font-size: 0.625rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--bulma-text-weak);
}

.online-filter__marks span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}

.online-filter__marks span:first-child {
    transform: none;
}

.online-filter__marks span:last-child {
    transform: translateX(-100%);
}

/* Premium gate: dim only the parts that are actually inert. The sentence and the
   "ranked" link stay at full contrast — the link is still clickable and focusable,
   so it gets no disabled exemption, and the copy is the upsell. */
.online-filter.is-locked .online-filter__rail,
.online-filter.is-locked .online-filter__scale,
.online-filter.is-locked .online-filter__marks {
    opacity: 0.45;
    filter: saturate(0.15);
}

.online-filter.is-locked .online-filter__rail {
    pointer-events: none;
}

@media screen and (max-width: 768px) {
    .online-filter .slider .noUi-handle {
        height: 24px;
        width: 24px;
        top: -8px;
        right: -13px;
    }
}

.last-played-ago {
    height: 100%;
    font-size: clamp(0.65rem, 1vw, 0.85rem);
    color: var(--bulma-text);
    text-align: center;
    align-content: center;
}

.morph-announce {
    --morph-accent: 260 91% 62%;
    border: 1px solid hsl(var(--morph-accent) / 0.35);
    background: hsl(var(--morph-accent) / 0.08);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 0.5em !important;
}

.morph-announce-link {
    color: hsl(var(--morph-accent));
    font-weight: 700;
}

.morph-announce-hint {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.92em;
    opacity: 0.8;
}

.morph-announce-try {
    display: inline-block;
    margin-top: 4px;
    color: hsl(var(--morph-accent));
    font-weight: 600;
}

.morph-announce-try:hover {
    text-decoration: underline;
}