/* ============================================================
   Dice ("Duelo de Dados") - pixel-identical WBET Originals dice
   values mirrored from nexusrivo.wo3yulsti.com/dice2
   ============================================================ */
.d2-root {
    --rb-card-deep: #191939;
    --rb-card-sunken: #12142E;
    --rb-bg: #090C1D;
    --rb-text: #ffffff;
    --rb-text-soft: rgba(191, 191, 191, 0.82);
    --rb-text-faint: rgba(160, 160, 160, 0.55);
    --rb-gold: #01e0a3;
    --rb-gold-deep: #04241b;
    --rb-border: rgba(1, 224, 163, 0.18);
    --rb-button-gradient: linear-gradient(420deg, rgb(0 255 142) 0%, #01e0a3 49%, #00aa6d 49%, #00aa6d 100%);
    --rb-button-box: #3a6d5f 0 -3px 0 0 inset, rgb(47 255 186) 0 2px 0 0 inset;
    background: var(--rb-bg);
    color: var(--rb-text);
    font-family: 'Inter', 'Exo 2', system-ui, sans-serif;
}

.d2-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 8px 0;
}
@media (min-width: 640px) { .d2-wrap { padding: 8px; } }

.d2-title {
    margin: 0 0 12px;
    padding-left: 4px;
    font-size: 19px;
    font-weight: 900;
    color: var(--rb-text);
}

.d2-grid { display: grid; gap: 12px; }
@media (min-width: 1024px) { .d2-grid { grid-template-columns: 320px minmax(0, 1fr); } }

.d2-left { order: 2; border-radius: 14px; background: var(--rb-card-deep); padding: 16px; }
@media (min-width: 1024px) { .d2-left { order: 1; } }
.d2-stack { display: flex; flex-direction: column; gap: 12px; }

.d2-betlabel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rb-text-faint);
}
.d2-betlabel .d2-bal { text-transform: none; letter-spacing: normal; }

.d2-inputrow { display: flex; align-items: stretch; gap: 4px; }
.d2-input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--rb-bg);
    padding: 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--rb-text);
    outline: none;
    font-family: inherit;
}
.d2-mini {
    flex-shrink: 0;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--rb-bg);
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--rb-text-soft);
    cursor: pointer;
    transition: filter 0.15s;
    font-family: inherit;
}
.d2-mini:hover { filter: brightness(1.25); }

.d2-fieldlabel {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rb-text-faint);
}

.d2-conds {
    display: flex;
    gap: 4px;
    border-radius: 8px;
    background: var(--rb-bg);
    padding: 4px;
}
.d2-condbtn {
    height: 36px;
    flex: 1;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    color: var(--rb-text-faint);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    font-family: inherit;
}
.d2-condbtn:hover { color: var(--rb-text); }
.d2-condbtn.active { background: var(--rb-card-deep); color: var(--rb-text); }

.d2-targetval {
    display: inline;
    margin-left: auto;
    text-transform: none;
    letter-spacing: normal;
    color: var(--rb-text);
}
.d2-slider {
    width: 100%;
    margin: 0;
    height: 44px;
    border: none;
    outline: none;
    background: transparent;
    accent-color: var(--rb-gold);
    cursor: pointer;
}

.d2-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.d2-wrapinput { position: relative; }
.d2-wrapinput .d2-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 12px;
    font-weight: 700;
    color: var(--rb-text-faint);
}

.d2-paybox { grid-column: span 2 / span 2; border-radius: 8px; background: var(--rb-bg); padding: 8px; }
.d2-paylabel {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rb-text-faint);
    margin-bottom: 2px;
}
.d2-payval { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 900; color: var(--rb-text); }

.d2-goldbtn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: var(--rb-button-gradient);
    box-shadow: var(--rb-button-box);
    color: var(--rb-gold-deep);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.15s, filter 0.15s;
    font-family: inherit;
}
.d2-goldbtn:hover { filter: brightness(1.08); }
.d2-goldbtn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- board ---- */
.d2-board { order: 1; min-width: 0; border-radius: 14px; background: #12142E; padding: 12px; }
@media (min-width: 640px) { .d2-board { padding: 16px; } }
@media (min-width: 1024px) { .d2-board { order: 2; } }

.d2-arena { position: relative; overflow: hidden; border-radius: 10px; min-height: min(56vh, 400px); background-color: #12142E; }
.d2-arena-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url('/assets/originals/board-bg.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.d2-arena-tint { position: absolute; inset: 0; pointer-events: none; background: rgba(6, 10, 18, 0.46); }
.d2-arena-inner { position: relative; height: 100%; }

.d2-stage {
    display: flex;
    min-height: min(56vh, 400px);
    flex-direction: column;
    justify-content: center;
    gap: 36px;
    padding: 24px 16px;
}

.d2-cen { text-align: center; }
.d2-dicelogo { display: block; margin: 0 auto 16px; height: 56px; width: 56px; object-fit: contain; opacity: 0.9; }

.d2-reelrow { display: flex; align-items: flex-end; justify-content: center; gap: 6px; }
.d2-reelgroup { display: flex; align-items: flex-end; gap: 6px; }
.d2-dot { padding-bottom: 8px; font-size: 34px; font-weight: 900; line-height: 1; transition: color 0.2s; color: rgba(226, 238, 255, 0.82); }
.d2-reel {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(rgba(12, 17, 28, 0.95), rgba(20, 27, 42, 0.95));
    box-shadow: rgba(255, 255, 255, 0.1) 0px 1px 0px inset, rgba(0, 0, 0, 0.55) 0px -8px 14px inset, rgba(0, 0, 0, 0.4) 0px 2px 6px;
}
.d2-reel-inner {
    position: absolute;
    inset: 0 auto 0 0;
    transform: translateY(0px);
    will-change: transform;
    transition: transform 0ms linear;
}
.d2-reel-cell {
    display: grid;
    place-items: center;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: rgba(226, 238, 255, 0.82);
    transition: color 0.2s;
}
.d2-reel-gloss {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: 10px;
    background: linear-gradient(rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, 0.22) 100%);
}
.d2-reelrow.win .d2-reel-cell, .d2-reelrow.win .d2-dot { color: var(--rb-gold); }
.d2-reelrow.lose .d2-reel-cell, .d2-reelrow.lose .d2-dot { color: #f4607a; }

/* ---- target bar ---- */
.d2-bar { position: relative; height: 58px; }
.d2-bar-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 24px;
    height: 10px;
    overflow: hidden;
    border-radius: 9999px;
    background: #f4607a;
}
.d2-bar-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--rb-gold);
    transition: left 0.15s, width 0.15s;
}
.d2-bar-marker {
    position: absolute;
    top: 16px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 9px solid var(--rb-text);
    transform: translateX(-50%);
    transition: left 0.15s;
}
.d2-bar-labels {
    position: absolute;
    left: 0;
    right: 0;
    top: 42px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    color: var(--rb-text-faint);
}

.d2-resultrow {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    align-items: center;
}
.d2-resulttxt { font-size: 16px; font-weight: 900; }
.d2-resulttxt.win { color: var(--rb-gold); }
.d2-resulttxt.lose { color: var(--rb-text-faint); }

/* ---- provably fair accordion (same family as wheel) ---- */
.d2-fair { margin-top: 12px; border-radius: 14px; background: var(--rb-card-deep); }
.d2-fair-head { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; border: none; background: transparent; padding: 12px 16px; text-align: left; cursor: pointer; font-family: inherit; }
.d2-fair-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--rb-text); }
.d2-fair-title svg { color: var(--rb-gold); }
.d2-fair-chevron { color: var(--rb-text-faint); transition: transform 0.2s; }
.d2-fair-chevron.open { transform: rotate(180deg); }
.d2-fair-body { display: none; flex-direction: column; gap: 12px; border-top: 1px solid var(--rb-border); padding: 16px; }
.d2-fair-body.open { display: flex; }
.d2-fair-desc { margin: 0; font-size: 12px; line-height: 1.625; color: var(--rb-text-soft); }
.d2-fair-box { display: flex; flex-direction: column; gap: 4px; }
.d2-fair-boxlabel { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rb-text-faint); }
.d2-fair-value { overflow-x: auto; word-break: break-all; border-radius: 6px; background: var(--rb-bg); padding: 6px 8px; font-size: 11px; color: var(--rb-text-soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.d2-fair-value.strong { font-family: inherit; font-weight: 600; }
.d2-fair-attach { display: flex; gap: 8px; }
.d2-fair-input { flex: 1; min-width: 0; height: 40px; border: none; border-radius: 8px; background: var(--rb-bg); padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--rb-text); outline: none; font-family: inherit; }
.d2-fair-btn { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: 10px; border: 1px solid var(--rb-border); background: var(--rb-bg); color: var(--rb-text); font-size: 12px; font-weight: 900; text-transform: uppercase; cursor: pointer; transition: filter 0.15s; font-family: inherit; }
.d2-fair-btn:hover { filter: brightness(1.25); }
.d2-fair-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.d2-fair-btn.shrink { flex-shrink: 0; padding: 0 16px; }
.d2-fair-btn.full { width: 100%; }