@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

.bet.winning-bet {
    box-shadow: inset 0 0 0 2px #ffdf8c, 0 0 15px #e8bc5440 !important;
    z-index: 5
}

.win-gain {
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-50%);
    font: 700 11px 'DM Sans', sans-serif;
    color: #173024;
    background: #ffe3a1;
    border: 1px solid #ffecc4;
    border-radius: 5px;
    padding: 3px 5px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 9;
    animation: win-rise .5s ease-out
}

.joint .win-gain {
    top: -25px
}

.winning-bet .bet-chip {
    background: #ffe7ae;
    box-shadow: 0 0 12px #f5d77e99
}

.win-gain::before {
    content: ' ';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 12px #e8bc5440
}

@keyframes win-rise {
    from {
        opacity: 0;
        transform: translate(-50%, 9px) scale(.8)
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1)
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px
}

.sound-toggle, .player-button {
    background: transparent;
    border: 1px solid #ffffff28;
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 13px
}

.player-button {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e4c891
}

.numbers {
    position: relative
}

.bet.covered {
    box-shadow: inset 0 0 0 2px #f5d792;
    background: #567a48
}

.bet.red.covered {
    background: #bc6551
}

.bet.black.covered {
    background: #466348
}

.joint.bet {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 26px;
    z-index: 3;
    background: transparent;
    border: 0;
    padding: 0;
    border-radius: 5px;
    display: grid;
    place-items: center
}

.joint.horizontal {
    width: 28px;
    height: 18px
}

.joint.corner {
    width: 21px;
    height: 21px;
    z-index: 4
}

.joint.zero-split {
    left: -3px !important
}

.joint-dot {
    display: block;
    width: 4px;
    height: 4px;
    background: #f1dab166;
    border-radius: 50%;
    pointer-events: none
}

.joint.corner .joint-dot {
    width: 5px;
    height: 5px;
    border-radius: 1px;
    transform: rotate(45deg)
}

.joint.bet:hover, .joint.bet:focus-visible {
    background: #e6cc8977;
    box-shadow: 0 0 0 1px #ffe4a6
}

.joint .bet-chip {
    right: 50%;
    bottom: 50%;
    transform: translate(50%, 50%);
    z-index: 6
}

.bet-guidance {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #90ac9c;
    font-size: 12px;
    margin: 24px 0 0
}

.leaderboard {
    margin-top: 38px;
    background: #102c23;
    border: 1px solid #68857555;
    border-radius: 18px;
    padding: 28px 30px
}

.leaderboard-heading {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.leaderboard-heading h2 {
    margin: 7px 0 0;
    font-size: 31px
}

.leaderboard-caption {
    font-size: 13px;
    color: #91ae9e;
    margin: 16px 0 20px
}

.leaderboard-scroll {
    overflow-x: auto
}

.leaderboard table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap
}

.leaderboard th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #90ac9c;
    padding: 12px 15px;
    border-bottom: 1px solid #ffffff20
}

.leaderboard td {
    padding: 16px 15px;
    border-bottom: 1px solid #ffffff10;
    font-size: 15px
}

.leaderboard th:nth-child(n+3), .leaderboard td:nth-child(n+3) {
    text-align: right
}

.leaderboard td:first-child {
    color: #cdb47c;
    width: 70px
}

.leaderboard tr.you {
    background: #cfb27712
}

.leaderboard tr.you td:nth-child(2) {
    color: #f0d591
}

#leaderboard-status {
    font-size: 14px;
    color: #adbfaf;
    margin: 12px 0
}

#leaderboard-status:empty {
    display: none
}

#profile-dialog {
    max-width: 700px;
    max-height: 90vh;
    padding: 30px 36px
}

#profile-dialog h2 {
    margin: 8px 0 14px
}

#profile-dialog p {
    margin: 10px 0 18px
}

#profile-form > label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px
}

#player-name {
    width: 100%;
    font: 16px 'DM Sans', sans-serif;
    background: #092219;
    color: #f5f0df;
    border: 1px solid #91a58480;
    border-radius: 8px;
    padding: 12px 14px;
    outline-color: #d7b87c
}

fieldset {
    border: 0;
    padding: 0;
    margin: 20px 0
}

legend {
    font-size: 14px;
    margin-bottom: 12px
}

.avatar-grid {
    display: grid;
    grid-template-columns:repeat(5, 1fr);
    gap: 9px
}

.avatar-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 4px;
    background: #193f30;
    border: 1px solid #ffffff18;
    border-radius: 9px;
    cursor: pointer;
    text-align: center;
    font-size: 12px;
    line-height: 1.2;
    min-height: 83px
}

.avatar-choice input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    inset: 0;
    margin: 0;
    cursor: pointer
}

.avatar-choice:has(input:checked) {
    border-color: #efd098;
    background: #597147;
    box-shadow: 0 0 0 1px #efd098
}

.avatar-choice:has(input:focus-visible) {
    outline: 3px solid #f8dfa8;
    outline-offset: 3px
}

.avatar-icon {
    font-size: 28px;
    line-height: 1.3
}

.profile-note {
    font-size: 12px !important;
    color: #9cb4a4 !important;
    margin: 14px 0 0 !important
}

#profile-error {
    color: #ffc0a9 !important
}

#save-profile {
    width: 100%;
    padding: 17px
}

.spin-result {
    font-size: 22px;
    text-align: center;
    max-width: 90%
}

#continue {
    max-width: 90%
}

.overlay {
    overflow-y: auto
}

.betting {
    isolation: isolate
}

.zero {
    z-index: 0
}

@media (max-width: 1000px) {
    headerr .demo {
        display: none
    }

    .header-actions {
        gap: 8px
    }

    .leaderboard {
        padding: 24px
    }

    .bet-guidance {
        flex-wrap: wrap
    }

    .player-button {
        max-width: 150px
    }
}

@media (max-width: 600px) {
    headerr .brand-sub {
        display: none
    }

    .brand {
        font-size: 20px !important;
        gap: 8px !important;
        letter-spacing: 3px !important
    }

    .brandmark {
        width: 32px !important;
        height: 32px !important;
        line-height: 32px !important
    }

    .header-actions {
        gap: 6px
    }

    .sound-toggle {
        font-size: 11px;
        padding: 7px
    }

    .player-button {
        font-size: 12px;
        padding: 7px;
        max-width: 108px
    }

    .header-actions .icon-button {
        display: none
    }

    #profile-dialog {
        padding: 26px 18px
    }

    .avatar-grid {
        grid-template-columns:repeat(4, 1fr);
        gap: 7px
    }

    .avatar-choice {
        font-size: 11px;
        min-height: 77px
    }

    .leaderboard {
        padding: 21px 14px
    }

    .leaderboard th, .leaderboard td {
        padding: 12px 9px
    }

    .leaderboard td {
        font-size: 13px
    }

    .leaderboard-caption {
        line-height: 1.6
    }

    .joint.bet {
        width: 20px;
        height: 26px
    }

    .joint.horizontal {
        width: 26px;
        height: 19px
    }

    .joint.corner {
        width: 20px;
        height: 20px
    }
}

:root {
    color-scheme: dark;
    --gold: #d7b87c;
    --muted: #8faaa1;
    --ink: #091b17;
    --line: #ffffff18
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: radial-gradient(ellipse at 50% 15%, #18372c 0, #0b1c17 55%, #091713 100%);
    color: #f5f4e9;
    font: 16px 'DM Sans', sans-serif;
    min-height: 100vh
}

button, a {
    -webkit-tap-highlight-color: transparent
}

button {
    font: inherit;
    cursor: pointer;
    color: inherit
}

button:disabled {
    opacity: .4;
    cursor: not-allowed
}

button:focus-visible, a:focus-visible {
    outline: 3px solid #f5d592;
    outline-offset: 4px
}

headerr {
    height: 100px;
    border-bottom: 1px solid var(--line);
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #f1dfb3;
    text-decoration: none;
    letter-spacing: 5px;
    font: 24px Georgia, serif
}

.brandmark {
    border: 1px solid var(--gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    padding-left: 5px
}

.brand-sub {
    font: 10px 'DM Sans', sans-serif;
    letter-spacing: 2px;
    border-left: 1px solid #ffffff25;
    padding-left: 17px;
    max-width: 110px;
    line-height: 1.7
}

.demo {
    font-size: 11px;
    letter-spacing: 2px;
    color: #a5b5aa
}

.demo span {
    margin: 0 12px;
    color: var(--gold)
}

.icon-button {
    border: 1px solid #ffffff30;
    background: transparent;
    border-radius: 50%;
    width: 32px;
    height: 32px
}

main {
    max-width: 1440px;
    margin: auto;
    padding: 0 5% 24px
}

.heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px
}

.eyebrow, .label {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--muted);
    font-weight: 600
}

h1 {
    font: 38px Georgia, serif;
    font-weight: 400;
    margin: 10px 0 0;
    letter-spacing: -1px
}

h1 span {
    font: 18px 'DM Sans', sans-serif;
    color: #526b60;
    margin-left: 10px
}

.balance {
    text-align: right
}

.balance > span {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--muted)
}

.balance strong {
    display: block;
    font: 28px 'Manrope', sans-serif;
    margin-top: 6px
}

small {
    font: 13px 'DM Sans', sans-serif;
    color: var(--muted);
    margin-left: 5px
}

.game {
    position: relative;
    overflow: hidden;
    border: 1px solid #68857555;
    border-radius: 20px;
    background: #112e25;
    box-shadow: 0 24px 80px #0003
}

.table-top, .table-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 30px
}

.table-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--gold)
}

.recent {
    display: flex;
    align-items: center;
    gap: 15px
}

.recent > span {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--muted)
}

#history {
    display: flex;
    gap: 6px;
    color: #739084
}

.history-number {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    font-size: 13px;
    border-radius: 5px;
    background: #182320
}

.history-number.red {
    background: #a84440
}

.history-number.green {
    background: #347859
}

.felt {
    padding: 32px 32px 18px;
    background: radial-gradient(ellipse at center, #1c614a, #154632 85%);
    box-shadow: inset 0 0 80px #0003;
    border-block: 1px solid #ffffff0c
}

.betting {
    display: grid;
    grid-template-columns:62px 1fr 65px;
    grid-template-rows:210px 49px 52px;
    gap: 5px
}

.numbers {
    display: grid;
    grid-template-columns:repeat(12, 1fr);
    grid-template-rows:repeat(3, 1fr);
    gap: 3px
}

.bet {
    border: 1px solid #bdc7a986;
    background: #194a37;
    position: relative;
    transition: background .15s, box-shadow .15s;
    font-size: 23px;
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    border-radius: 3px
}

.bet:hover {
    box-shadow: inset 0 0 0 2px var(--gold);
    background: #57754b
}

.bet.red {
    background: #a8423f
}

.bet.red:hover {
    background: #c0574d
}

.bet.black {
    background: #172b26
}

.bet.black:hover {
    background: #35463c
}

.zero {
    font-size: 30px;
    border-radius: 26px 3px 3px 26px
}

.columns {
    display: grid;
    gap: 3px
}

.columns button {
    font-size: 14px
}

.dozens {
    grid-column: 2;
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 4px
}

.outside {
    grid-column: 2;
    display: grid;
    grid-template-columns:repeat(6, 1fr);
    gap: 4px
}

.dozens button, .outside button {
    font-size: 14px;
    letter-spacing: 1px
}

.diamond {
    display: inline-block;
    width: 20px;
    height: 20px;
    transform: rotate(45deg);
    background: #c3514d;
    vertical-align: middle
}

.diamond.black {
    background: #162720;
    border: 1px solid #ffffff45
}

.felt-caption {
    display: flex;
    justify-content: space-between;
    padding: 24px 0 0 67px;
    font-size: 9px;
    letter-spacing: 3px;
    color: #a3c0a975
}

.status {
    font-size: 14px;
    color: #c7d6c9
}

.text-button {
    border: 0;
    background: transparent;
    font-size: 12px;
    color: var(--muted)
}

.controls {
    display: flex;
    align-items: center;
    gap: 34px;
    margin-top: 28px;
    padding: 0 3px
}

.label {
    display: block;
    margin-bottom: 13px
}

.chips {
    display: flex;
    gap: 12px
}

.chip {
    position: relative;
    border-radius: 50%;
    width: 51px;
    height: 51px;
    border: 5px dashed #ffffff9c;
    outline: 1px solid #ffffff20;
    box-shadow: 0 5px 8px #0004, inset 0 0 0 2px #ffffff35;
    background: var(--chip);
    font-size: 14px;
    font-weight: 700;
    transition: transform .2s, outline .2s
}

.chip.selected {
    outline: 2px solid var(--gold);
    outline-offset: 5px;
    transform: translateY(-3px)
}

.bet-chip {
    position: absolute;
    right: 3px;
    bottom: 3px;
    background: #eed5a3;
    color: #2c281e;
    border: 3px dashed #8e7040;
    border-radius: 50%;
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    font: bold 10px 'DM Sans', sans-serif;
    box-shadow: 0 2px 5px #0007;
    pointer-events: none
}

.bet-total {
    border-left: 1px solid var(--line);
    padding-left: 30px;
    min-width: 132px
}

.bet-total strong {
    font: 25px 'Manrope', sans-serif
}

.actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 26px
}

.minor-actions {
    display: flex;
    gap: 16px
}

.minor-actions button, footerr button {
    border: 0;
    background: transparent;
    font-size: 12px;
    color: #afbeb2;
    padding: 8px 0
}

.spin {
    border: 1px solid #edcc8a;
    background: linear-gradient(130deg, #e9cd91, #bc9556);
    color: #1c281e;
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 12px;
    border-radius: 8px;
    padding: 22px 25px;
    box-shadow: 0 5px 20px #cfa45b15
}

.spin span {
    font-size: 21px;
    margin-left: 30px
}

footerr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 38px;
    color: #627d6e;
    font-size: 11px
}

footerr > span:last-child {
    font-size: 9px;
    letter-spacing: 2px
}

footerr i {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #72866b;
    border-radius: 50%;
    margin-right: 8px
}

.overlay {
    position: absolute;
    inset: 0;
    background: #081b17ed;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: reveal .35s ease
}

.overlay[hidden] {
    display: none
}

.spin-heading {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--gold);
    margin-bottom: 4px
}

.wheel-wrap {
    width: min(380px, 65vh);
    aspect-ratio: 1;
    position: relative
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 15px 25px #0008)
}

.wheel-pointer {
    position: absolute;
    top: 2%;
    left: calc(50% - 7px);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 16px solid #f5d295
}

.spin-result {
    font: 24px Georgia, serif;
    margin-top: 3px;
    min-height: 29px
}

.continue {
    margin-top: 12px;
    background: #d7b87c;
    color: #132c21;
    border: 0;
    border-radius: 6px;
    padding: 10px 22px;
    font-size: 13px
}

dialog {
    margin: 100px auto auto;
    background: #123328;
    color: #e8eddf;
    border: 1px solid #bfa26970;
    border-radius: 18px;
    padding: 38px;
    max-width: 480px;
    width: calc(100% - 32px);
    line-height: 1.65
}

dialog::backdrop {
    background: #000a;
    backdrop-filter: blur(6px)
}

h2 {
    font: 32px Georgia, serif
}

dialog p {
    font-size: 14px;
    color: #b8cbbd
}

dl {
    display: grid;
    grid-template-columns:1fr auto;
    font-size: 14px;
    gap: 10px
}

dd {
    color: var(--gold);
    margin: 0
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: 0;
    font-size: 25px
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: scale(.97)
    }
    to {
        opacity: 1;
        transform: scale(1)
    }
}

@media (min-width: 1500px) {
    main {
        padding-top: 0;
    }

    .betting {
        grid-template-rows:240px 55px 58px
    }

    .wheel-wrap {
        width: 410px
    }
}

@media (max-width: 1100px) {
    .controls {
        flex-wrap: wrap;
        gap: 25px
    }

    .actions {
        flex: 1;
        justify-content: flex-end
    }

    .minor-actions {
        gap: 10px
    }

    .chips {
        gap: 10px
    }

    .chip {
        width: 45px;
        height: 45px
    }

    .bet-total {
        padding-left: 20px
    }

    .spin {
        padding: 17px
    }

    .spin span {
        margin-left: 10px
    }
}

@media (max-width: 760px) {
    headerr {
        height: 76px
    }

    .demo {
        display: none
    }

    .brand-sub {
        font-size: 9px
    }

    main {
        padding: 26px 16px
    }

    h1 {
        font-size: 27px
    }

    h1 span {
        display: none
    }

    .eyebrow {
        font-size: 9px;
        letter-spacing: 1.5px
    }

    .balance strong {
        font-size: 21px
    }

    .balance > span {
        font-size: 9px
    }

    .heading {
        gap: 15px
    }

    .table-top, .table-bottom {
        padding: 18px 15px
    }

    .table-label {
        font-size: 9px;
        letter-spacing: 1px
    }

    .recent > span {
        display: none
    }

    .felt {
        padding: 20px 12px 15px
    }

    .table-scroll {
        overflow-x: auto;
        padding-bottom: 7px
    }

    .betting {
        min-width: 620px;
        grid-template-columns:44px 1fr 43px;
        grid-template-rows:180px 44px 44px
    }

    .bet {
        font-size: 19px
    }

    .dozens button, .outside button, .columns button {
        font-size: 12px
    }

    .felt-caption {
        padding-left: 0;
        font-size: 8px;
        letter-spacing: 1px
    }

    .table-bottom .text-button {
        font-size: 11px
    }

    .status {
        font-size: 12px;
        max-width: 70%
    }

    .controls {
        gap: 25px;
        justify-content: space-between
    }

    .chip-area {
        flex: 1
    }

    .bet-total {
        min-width: 90px;
        padding-left: 15px
    }

    .chips {
        gap: 11px
    }

    .chip {
        width: 42px;
        height: 42px;
        font-size: 11px
    }

    .label {
        font-size: 9px
    }

    .actions {
        flex-basis: 100%;
        justify-content: space-between
    }

    .minor-actions {
        gap: 20px
    }

    .spin {
        flex: 1;
        max-width: 230px;
        margin-left: 20px
    }

    footerr {
        gap: 20px;
        flex-wrap: wrap;
        margin-top: 24px
    }

    footerr > span:last-child {
        display: none
    }

    .wheel-wrap {
        width: 320px;
        max-width: 90%
    }

    .spin-heading {
        font-size: 10px
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important
    }
}
