*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    overscroll-behavior: none;
}

.login1-page {
    --login1-max: 402px;
    --login1-screen-x: 12px;
    --login1-sidebar-w: 80px;
    --login1-footer-h: 73px;
    --login1-deposit-size: 76px;
    --login1-deposit-labels-h: 32px;
    --login1-deposit-overlap: 40px;
    --login1-footer-label-line: 11px;
    --login1-footer-label-gap: 3px;

    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    background: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    overflow: hidden;
}

.login1 {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    max-width: var(--login1-max);
    margin: 0 auto;
    min-height: 0;
    overflow: hidden;
    padding-left: var(--login1-screen-x);
    padding-right: var(--login1-screen-x);
    padding-bottom: calc(var(--login1-footer-h) + var(--login1-deposit-overlap) + env(safe-area-inset-bottom, 0px));
}

/* ===== Banner ===== */
.login1-banner {
    width: 100%;
    line-height: 0;
}

.login1-banner__frame {
    position: relative;
    width: 100%;
    line-height: 0;
}

.login1-banner__img {
    display: block;
    width: 100%;
    height: auto;
}

.login1-banner__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 0;
    pointer-events: none;
}

.login1-banner__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, transform 0.15s ease;
}

.login1-banner__dot.is-active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.15);
}

.login1-banner__dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.login1-banner__dots.is-hidden {
    display: none;
}

/* ===== News ticker ===== */
.login1-news {
    position: relative;
    width: 100%;
    min-height: 24px;
    line-height: 0;
}

.login1-news__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
}

.login1-news__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    padding: 4px 10px;
    overflow: hidden;
}

.login1-news__icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.login1-news__track {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.login1-news__marquee {
    display: flex;
    width: max-content;
    font-size: 11px;
    line-height: 1.3;
    color: #e8e8e8;
    white-space: nowrap;
    animation: login1-marquee 16s linear infinite;
}

.login1-news__marquee span {
    flex-shrink: 0;
}

@keyframes login1-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ===== Action bar ===== */
.login1-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 6px 10px;
    background: #000;
}

.login1-actions__auth {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
}

.login1-actions--logged-in .login1-actions__auth {
    display: none;
}

.login1-actions__user {
    display: none;
    flex-shrink: 0;
}

.login1-actions--logged-in .login1-actions__user {
    display: flex;
}

.login1-actions__user-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    width: 142px;
    height: 46px;
    padding: 5px 8px;
    border: 1.5px solid #63defe;
    border-radius: 9px;
    background: linear-gradient(180deg, #2e2e2e 0%, #161616 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.login1-actions__user-top {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #14E8FF;
}

.login1-actions__balance,
#login1-balance {
    font-family: Inter, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 700;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0;
    text-align: center;
    color: #14E8FF;
    -webkit-text-fill-color: #14E8FF;
}

.login1-actions__refresh {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease;
}

.login1-actions__refresh img {
    display: block;
    width: 12px;
    height: 12px;
    max-width: 12px;
    max-height: 12px;
    object-fit: contain;
    pointer-events: none;
}

.login1-actions__refresh:active {
    transform: rotate(-45deg);
}

.login1-actions__refresh:disabled {
    opacity: 0.5;
    cursor: wait;
}

.login1-actions__greeting {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 500;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.login1-actions__greeting span {
    font-weight: 500;
}

.login1-actions__btn {
    flex-shrink: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    line-height: 0;
    transition: transform 0.15s ease;
}

.login1-actions__btn--login,
.login1-actions__btn--signin {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 68px;
    height: 46px;
    line-height: 1;
    border-radius: 9px;
    background: linear-gradient(180deg, #63defe 0%, #18c3f3 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.login1-actions__btn--login .login1-actions__btn-icon,
.login1-actions__btn--signin .login1-actions__btn-icon {
    display: block;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    max-width: 16px;
    max-height: 16px;
    object-fit: contain;
}

.login1-actions__btn-label {
    font-size: 11px;
    font-weight: 700;
    color: #000;
    letter-spacing: 0.01em;
}

.login1-actions__btn:hover {
    transform: scale(1.04);
}

.login1-actions__quick {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    max-width: 227px;
    height: 46px;
    border-radius: 9px;
    overflow: hidden;
}

.login1-actions__quick-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
}

.login1-actions__quick-nav {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    padding: 0 6px;
}

.login1-actions__quick-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: 0 2px;
    border: none;
    background: transparent;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.15s ease;
}

.login1-actions__quick-icon {
    display: block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    object-fit: contain;
}

.login1-actions__quick-label {
    font-size: 9px;
    font-weight: 700;
    color: #63defe;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.login1-actions__quick-item:hover {
    transform: scale(1.05);
}

/* ===== Main: sidebar + games ===== */
.login1-body {
    display: flex;
    flex: 1 1 0;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    overflow: hidden;
    background: #000;
}

.login1-sidebar {
    display: flex;
    flex: 0 0 var(--login1-sidebar-w);
    flex-direction: column;
    width: var(--login1-sidebar-w);
    min-height: 0;
    padding: 4px 0 0;
    line-height: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.login1-sidebar::-webkit-scrollbar {
    display: none;
}

.login1-sidebar__nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-height: 100%;
    padding: 6px 0 10px;
}

.login1-sidebar__nav::after {
    content: '';
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
}

.login1-sidebar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 0 2px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.login1-sidebar__icon {
    display: block;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    max-width: 26px;
    max-height: 26px;
    object-fit: contain;
}

.login1-sidebar__label {
    color: #fff;

    font-family: Inter;
    font-weight: 500;
    font-style: Medium;
    font-size: 10px;
    line-height: 100%;
    letter-spacing: 0%;
    text-align: center;
    text-transform: uppercase;
}

.login1-sidebar__item--active .login1-sidebar__label {
    color: #63defe;
}

.login1-sidebar__item:hover {
    transform: scale(1.04);
}

.login1-sidebar__item:not(.login1-sidebar__item--active):hover {
    opacity: 0.85;
}

.login1-games {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 4px calc(var(--login1-deposit-overlap) + 12px) 2px;
}

.login1-games::-webkit-scrollbar {
    display: none;
}

.login1-games__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 4px;
    list-style: none;
    padding-bottom: 8px;
}

.login1-game {
    line-height: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease;
}

@media (hover: hover) {
    .login1-game:hover {
        transform: scale(1.03);
    }
}

.login1-game > img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.login1-game__card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    isolation: isolate;
    cursor: pointer;
    touch-action: pan-y;
}

.login1-game__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.login1-game__icon {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 1;
    transform: translateX(-50%);
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: center top;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.login1-game__img--lazy:not(.login1-game__img--loaded) {
    opacity: 0;
}

.login1-game__img--lazy.login1-game__img--loaded {
    opacity: 1;
    transition: opacity 0.2s ease;
}

.login1-game__name-bg {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    width: 100%;
    height: auto;
    object-fit: fill;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.login1-game__name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 6%;
    z-index: 3;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0 4px;
    font-size: clamp(8px, 2.6vw, 10px);
    font-weight: 400;
    line-height: 1;
    color: #fff;
    pointer-events: none;
    user-select: none;
}

.login1-game__name--scroll {
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.login1-game__name-marquee {
    display: flex;
    width: max-content;
    white-space: nowrap;
}

.login1-game__name:not(.login1-game__name--scroll) .login1-game__name-marquee {
    width: 100%;
    justify-content: center;
}

.login1-game__name-text {
    flex-shrink: 0;
    white-space: nowrap;
}

.login1-game__name--scroll .login1-game__name-text + .login1-game__name-text {
    padding-left: 24px;
}

.login1-game__name--scroll .login1-game__name-marquee {
    animation: login1-game-name-marquee 10s linear infinite;
}

@keyframes login1-game-name-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-50% - 12px));
    }
}

@media (min-width: 403px) {
    .login1-page {
        background: #0a0a0a;
    }

    .login1 {
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.65);
    }
}

@media (max-width: 380px) {
    .login1-actions__btn--login,
    .login1-actions__btn--signin {
        width: 60px;
        height: 41px;
    }

    .login1-actions__btn--login .login1-actions__btn-icon,
    .login1-actions__btn--signin .login1-actions__btn-icon {
        width: 14px;
        height: 14px;
        max-width: 14px;
        max-height: 14px;
    }

    .login1-actions__user-card {
        width: 126px;
        height: 41px;
        padding: 4px 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login1-news__marquee {
        animation: none;
        width: auto;
        white-space: normal;
    }

    .login1-news__marquee span + span {
        display: none;
    }

    .login1-game__name--scroll .login1-game__name-marquee {
        animation: none;
        transform: none;
    }

    .login1-actions__btn,
    .login1-game {
        transition: none;
    }
}

.login1-page #toast-container {
    position: fixed;
    top: max(12px, env(safe-area-inset-top, 0px));
    left: 50%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: min(var(--login1-max), 100%);
    padding-left: max(var(--login1-screen-x), env(safe-area-inset-left, 0px));
    padding-right: var(--login1-screen-x);
    box-sizing: border-box;
    transform: translateX(-50%);
    pointer-events: none;
}

.login1-page .toast-msg {
    background: linear-gradient(180deg, #63DEFE 0%, #18C3F3 100%);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    animation: login1ToastInOut 3s ease forwards;
    pointer-events: auto;
    will-change: transform, opacity;
}

.login1-page .toast-error {
    background: linear-gradient(180deg, #FF0000 0%, #FF0000 100%);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    animation: login1ToastInOut 3s ease forwards;
    pointer-events: auto;
    will-change: transform, opacity;
}

@keyframes login1ToastInOut {
    0% {
        opacity: 0;
        transform: translateY(-12px);
    }
    12% {
        opacity: 1;
        transform: translateY(0);
    }
    78% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-8px);
    }
}
