/* ⚡ Fast mode of the hash games (partials/hash-fast, js/casino/hash-fast.js): the switch «by TRON block / fast», the instant
   round's card and the player's recent fast games. Lives inside the dark console of hash.css; the block mode is untouched. */

/* ——— The switch ——— */

.hs-mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 14px 20px 0;
    padding: 5px;
    border: 1px solid var(--cas-line-strong);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.hs-mode__opt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 6px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--cas-on-dark-2);
    font: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.hs-mode__opt:hover {
    color: var(--cas-on-dark);
}

.hs-mode__opt.is-active {
    background: var(--cas-gold);
    color: #2b1a00;
}

.hs-mode__opt:focus-visible {
    outline: 2px solid var(--cas-gold);
    outline-offset: 2px;
}

.hs-mode__icon {
    font-size: 20px;
    line-height: 1;
}

.hs-mode__icon--tron {
    width: 22px;
    height: 22px;
    flex: none;
}

.hs-mode__text {
    display: grid;
    text-align: left;
    line-height: 1.2;
}

.hs-mode__text b {
    font-size: 15px;
    font-weight: 800;
}

.hs-mode__text small {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.85;
}

/* 哈希牛牛: no switch, a link to the card table. */
.hs-mode--link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--cas-on-dark);
    text-decoration: none;
}

.hs-mode--link:hover {
    border-color: var(--cas-gold);
}

.hs-mode--link .hs-mode__text {
    flex: 1;
}

.hs-mode--link .hs-mode__text b {
    color: var(--cas-gold);
}

.hs-mode--link .hs-mode__text small {
    color: var(--cas-on-dark-2);
    opacity: 1;
}

/* ——— Fast mode: the round header and the block's last result give way to the instant card ——— */

.hs-page.is-fast [data-round],
.hs-page.is-fast [data-last] {
    display: none;
}

.hs-fast {
    display: grid;
    gap: 12px;
    padding: 14px 20px 16px;
    border-bottom: 1px solid var(--cas-line);
}

.hs-fast[hidden] {
    display: none;
}

.hs-fast__card {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--cas-line-strong);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    transition: border-color 0.2s, background 0.2s;
}

.hs-fast__head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--cas-on-dark-2);
    font-size: 13px;
    font-weight: 700;
}

.hs-fast__check {
    color: var(--cas-gold);
    text-decoration: none;
}

.hs-fast__check:hover {
    text-decoration: underline;
}

.hs-fast__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    min-height: 48px;
}

.hs-fast__slot {
    display: inline-grid;
}

.hs-fast__slot.is-rolling .hs-ball,
.hs-fast__slot.is-rolling .hs-die {
    filter: blur(0.6px);
    opacity: 0.85;
    animation: hs-fast-shake 0.14s linear infinite;
}

.hs-fast__slot.is-stopped .hs-ball,
.hs-fast__slot.is-stopped .hs-die {
    animation: hs-fast-land 0.32s var(--cas-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
}

@keyframes hs-fast-shake {
    0% { transform: translateY(-2px) rotate(-6deg); }
    50% { transform: translateY(2px) rotate(6deg); }
    100% { transform: translateY(-2px) rotate(-6deg); }
}

@keyframes hs-fast-land {
    from { transform: scale(1.25); }
    to { transform: scale(1); }
}

.hs-fast__card.is-rolling .hs-fast__hash {
    color: var(--cas-on-dark-2);
    opacity: 0.6;
}

.hs-fast__verdict.is-new {
    animation: hs-pop 0.45s var(--cas-spring, ease-out);
}

.hs-fast__hash {
    word-break: break-all;
}

/* Recent fast games of the player: beads, the newest first; a tap shows the round again. */
.hs-fast__recent {
    display: grid;
    gap: 6px;
}

.hs-fast__recent > small {
    color: var(--cas-on-dark-2);
    font-size: 12.5px;
    font-weight: 700;
}

.hs-fast__beads {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0 0 2px;
    overflow-x: auto;
    list-style: none;
    scrollbar-width: none;
}

.hs-fast__beads::-webkit-scrollbar {
    display: none;
}

.hs-fast__bead {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-width: 64px;
    padding: 6px 8px;
    border: 1px solid var(--cas-line-strong);
    border-radius: 10px;
    background: transparent;
    color: var(--cas-on-dark-2);
    font: inherit;
    cursor: pointer;
}

.hs-fast__bead.is-new {
    animation: hs-pop 0.4s var(--cas-spring, ease-out);
}

.hs-fast__bead b {
    font-family: var(--cas-mono);
    font-size: 12px;
}

.hs-fast__bead.is-win {
    border-color: rgba(52, 211, 153, 0.55);
}

.hs-fast__bead.is-win b {
    color: #6ee7b7;
}

.hs-fast__bead.is-loss b {
    color: #fda4af;
}

.hs-fast__bead-res .hs-res {
    gap: 2px;
}

.hs-fast__bead-res .hs-ball,
.hs-fast__bead-res .hs-die {
    width: 20px;
    height: 20px;
    font-size: 11px;
    box-shadow: none;
}

.hs-fast__bead-res .hs-die {
    padding: 2px;
    border-radius: 5px;
}

.hs-fast__bead-res .hs-die i {
    width: 3.5px;
    height: 3.5px;
}

.hs-fast__bead-res .hs-op,
.hs-fast__bead-res .hs-tail {
    font-size: 11px;
}

.hs-fast__none {
    color: var(--cas-on-dark-2);
    font-size: 13px;
}

.hs-place.is-busy {
    cursor: progress;
}

@media (max-width: 640px) {
    .hs-mode {
        margin: 12px 12px 0;
    }

    .hs-mode__opt {
        gap: 7px;
        padding: 6px 8px;
    }

    .hs-mode__text b {
        font-size: 14px;
    }

    .hs-fast {
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hs-fast__slot.is-rolling .hs-ball,
    .hs-fast__slot.is-rolling .hs-die,
    .hs-fast__slot.is-stopped .hs-ball,
    .hs-fast__slot.is-stopped .hs-die,
    .hs-fast__verdict.is-new,
    .hs-fast__bead.is-new {
        animation: none;
    }
}
