:root {
    --demo-surface: #191d25;
    --demo-border: #313743;
    --demo-muted: #b8c2df;
    --demo-green: #24d66f;
    --demo-orange: #ff9f0a;
}

.home-demo-wrap {
    margin-top: 22px;
}

.demo-player {
    aspect-ratio: auto;
    background: #070a0e url('fury-of-anubis-poster.webp') center/cover no-repeat;
    border: 1px solid var(--demo-border);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    height: 520px !important;
    min-height: 0 !important;
    overflow: hidden;
    padding: 0;
    position: relative;
}

.demo-player::before {
    background: rgba(4, 8, 10, 0.66);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

.demo-player.is-loaded::before {
    display: none;
}

.demo-player .demo-start {
    align-items: center;
    display: flex;
    flex-direction: column;
    inset: 0;
    height: auto;
    justify-content: center;
    min-height: 0;
    padding: 28px;
    position: absolute;
    text-align: center;
    z-index: 2;
}

.bonus-modal {
    align-items: center;
    background: rgba(5, 8, 12, 0.82);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 28px 16px;
    position: fixed;
    z-index: 20000;
}

.bonus-modal[hidden] { display: none; }

.bonus-modal__dialog {
    background: #181d25;
    border: 1px solid var(--demo-border);
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
    color: #fff;
    max-width: 960px;
    padding: 30px 34px 28px;
    position: relative;
    width: min(100%, 960px);
}

.bonus-modal__title { font-size: 1.55rem; margin: 0 0 22px; padding: 0; text-align: center; }
.bonus-modal__title::before { display: none; }
.bonus-modal__close { background:transparent; border:0; color:#fff; cursor:pointer; font-size:2rem; line-height:1; position:absolute; right:22px; top:18px; }
.bonus-modal__viewport { overflow: hidden; }
.bonus-modal__track { align-items:stretch; display:grid; gap:14px; grid-template-columns:repeat(3,minmax(0,1fr)); }
.casino-card { background:#303642; border:1px solid var(--demo-border); border-radius:8px; display:grid; grid-template-rows:90px 1fr; overflow:hidden; position:relative; text-align:center; }
.casino-card.is-hot { border-color:var(--demo-green); }
.casino-card__ribbon { background:var(--demo-green); color:#08110c; font-size:.7rem; font-weight:900; left:-38px; padding:7px 38px; position:absolute; text-transform:uppercase; top:18px; transform:rotate(-45deg); }
.casino-card__logo { align-items:center; background:#252b35; display:flex; font-size:1.55rem; font-weight:900; justify-content:center; padding:18px; }
.casino-card__body { display:grid; grid-template-rows:minmax(68px,auto) minmax(34px,auto) auto auto; padding:18px 18px 12px; }
.casino-card__offer { align-items:center; color:#fff; display:flex; font-size:1.2rem; font-weight:900; justify-content:center; line-height:1.2; margin:0 0 16px; }
.casino-card__offer--sub { font-size:.92rem; margin-top:-10px; }
.casino-card__button { align-self:end; background:var(--demo-green); border-radius:8px; color:#08110c; display:block; font-weight:900; margin:0 auto 8px; padding:13px 16px; text-decoration:none; }
.casino-card.is-hot .casino-card__button { background:var(--demo-orange); color:#11151c; }
.casino-card__terms { color:var(--demo-muted); display:block; font-size:.76rem; font-weight:800; }
.bonus-modal__controls { display:none; gap:10px; justify-content:center; margin-top:18px; }
.bonus-modal__controls:not([hidden]) { display:flex; }
.bonus-modal__arrow { background:#303642; border:1px solid var(--demo-border); border-radius:50%; color:#fff; cursor:pointer; font-size:1.3rem; height:42px; width:42px; }

.demo-player .demo-start[hidden],
.demo-player .demo-loading[hidden],
.demo-player .demo-iframe[hidden] {
    display: none !important;
}

.demo-start__hint {
    color: #dbe4fa;
    max-width: 560px;
    text-shadow: 0 2px 2px #000;
}

.demo-start__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 18px;
}

.demo-player .demo-loading {
    align-items: center;
    background: rgba(7, 10, 14, 0.84);
    display: flex;
    flex-direction: column;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: absolute;
    z-index: 4;
}

.demo-loading__spinner {
    animation: demo-spin 0.8s linear infinite;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: var(--demo-green);
    height: 44px;
    margin-bottom: 14px;
    width: 44px;
}

@keyframes demo-spin { to { transform: rotate(360deg); } }

.demo-player .demo-iframe {
    border: 0;
    display: block;
    height: 100%;
    inset: 0;
    min-height: 0;
    position: absolute;
    width: 100%;
    z-index: 1;
}

.demo-fullscreen-control {
    align-items: center;
    background: rgba(24, 29, 37, 0.92);
    border: 1px solid var(--demo-border);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: none;
    font-size: 1.2rem;
    height: 42px;
    justify-content: center;
    left: 50%;
    position: absolute;
    top: 12px;
    transform: translateX(-50%);
    width: 42px;
    z-index: 20;
}

.demo-player.is-loaded .demo-fullscreen-control {
    display: inline-flex;
}

.demo-fullscreen-bar {
    align-items: center;
    background: #181d25;
    border-top: 1px solid var(--demo-border);
    display: none;
    justify-content: space-between;
    min-height: 62px;
    padding: 10px 16px;
}

.demo-fullscreen-close {
    align-items: center;
    background: #303642;
    border: 1px solid var(--demo-border);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.45rem;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.demo-rating {
    align-items: center;
    background: #303642;
    border: 1px solid var(--demo-border);
    border-radius: 0 0 8px 8px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 16px 18px;
}

.demo-rating__stars {
    align-items: center;
    display: flex;
    gap: 4px;
}

.demo-rating__star {
    background: transparent;
    border: 0;
    color: #d8e5ff;
    cursor: pointer;
    font-size: 1.65rem;
    line-height: 1;
    padding: 0;
}

.demo-rating__star.is-active,
.demo-rating__star:hover,
.demo-rating__star:focus-visible {
    color: #ffd35a;
}

.demo-rating__value {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 900;
    margin-right: auto;
}

.demo-mobile-fullscreen {
    align-items: center;
    background: #181d25;
    border: 1px solid var(--demo-border);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: none;
    font-weight: 900;
    min-height: 40px;
    padding: 9px 14px;
}

.demo-player:fullscreen,
.demo-player:-webkit-full-screen,
.demo-player.is-pseudo-fullscreen {
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100vh !important;
    inset: 0;
    max-height: none;
    max-width: none;
    padding: 0;
    width: 100vw;
}

.demo-player.is-pseudo-fullscreen {
    height: 100dvh;
    position: fixed;
    z-index: 19000;
}

.demo-player:fullscreen .demo-iframe,
.demo-player:-webkit-full-screen .demo-iframe,
.demo-player.is-pseudo-fullscreen .demo-iframe {
    grid-row: 1;
    height: 100%;
    min-height: 0;
    position: static;
}

.demo-player:fullscreen .demo-start,
.demo-player:-webkit-full-screen .demo-start,
.demo-player.is-pseudo-fullscreen .demo-start,
.demo-player:fullscreen .demo-fullscreen-control,
.demo-player:-webkit-full-screen .demo-fullscreen-control,
.demo-player.is-pseudo-fullscreen .demo-fullscreen-control {
    display: none !important;
}

.demo-player:fullscreen .demo-fullscreen-bar,
.demo-player:-webkit-full-screen .demo-fullscreen-bar,
.demo-player.is-pseudo-fullscreen .demo-fullscreen-bar {
    display: flex;
}

body.demo-modal-open {
    overflow: hidden;
    width: 100%;
}

@media (max-width: 768px) {
    .demo-player {
        height: 390px !important;
    }

    .demo-player.is-loaded .demo-fullscreen-control {
        display: none;
    }

    .home-demo-wrap.is-loaded .demo-mobile-fullscreen {
        display: inline-flex;
        justify-content: center;
        order: -1;
    }

    .demo-rating {
        align-items: flex-start;
        flex-direction: column;
    }

    .demo-rating__stars {
        max-width: 100%;
    }

    .demo-rating__star {
        font-size: clamp(1.2rem, 6vw, 1.65rem);
    }

    .bonus-modal { align-items:flex-start; overflow-y:auto; padding:18px 14px; }
    .bonus-modal__dialog { padding:26px 18px 24px; }
    .bonus-modal__track { grid-template-columns:1fr; }
}
