html {
    min-height: 100%;
    background: oklch(96.7% 0.003 264.542);
}

@supports (-webkit-touch-callout: none) and (not (translate: none)) {
    @media  (width <= 500px) {
        html {
            min-height: 114dvh !important;
        }
        
        html.is-safari body.scene-preview-active {
            height: 114dvh;
        }

        html.is-safari .scene-viewport {
            height: 114dvh;
            min-height: 114dvh;
        }
    }
}

body{
    user-select: none;
    -webkit-user-select: none;
    --scene-subtitle-font-scale: 1;
    min-height: 100%;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    background: oklch(96.7% 0.003 264.542);
    overscroll-behavior-y: none;
}

html.scene-preview-emulated-fullscreen,
body.scene-preview-emulated-fullscreen {
    overflow: hidden;
    background: #0a0618;
}

body.scene-preview-emulated-fullscreen .scene-viewport {
    z-index: 2147483000;
}

*{
    transition: all 0.3s ease;
    box-sizing: border-box;
}

img, svg {
    user-drag: none;
    -webkit-user-drag: none;
}

.scene-viewport {
    position: relative;
    width: 100%;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    height: var(--app-viewport-height, 100dvh);
    min-height: var(--app-viewport-height, 100dvh);
    overflow: hidden;
    background: #0a0618;
    isolation: isolate;
}


.empty-layout-shell {
    min-height: 100vh;
    min-height: 100dvh;
    min-height: var(--app-viewport-height, 100dvh);
}

.scene-frame-page {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.scene-preview-settings-scroll {
    -webkit-overflow-scrolling: touch;
}

.scrollable-instruction-backdrop {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-top: calc(1rem + max(env(safe-area-inset-top), 0px));
    padding-bottom: calc(1rem + max(env(safe-area-inset-bottom), 0px));
}

.scrollable-instruction-card {
    display: flex;
    flex-direction: column;
    max-height: calc(var(--app-viewport-height, 100dvh) - 2rem - max(env(safe-area-inset-top), 0px) - max(env(safe-area-inset-bottom), 0px));
}

.scrollable-instruction-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}


#dotnet-compile-error{
    display: none;
}

#components-reconnect-modal{
    display: none !important;
}

#scene_subtitles {
    opacity: 0;
    transform-origin: center bottom;
    transition: opacity 220ms ease;
    font-size: calc(1.25rem * var(--scene-subtitle-font-scale));
}

#scene_subtitles.scene-subtitle-visible {
    opacity: 1;
}

.scene-subtitle-word {
    display: inline-block;
    margin: 0 0.14em;
    opacity: 0;
    translate: 0 0.32em;
    filter: blur(3px);
    animation: scene-subtitle-word-in 680ms cubic-bezier(.16, .84, .24, 1) forwards;
}

body.scene-animations-disabled *,
body.scene-animations-disabled *::before,
body.scene-animations-disabled *::after {
    animation: none !important;
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
}

body.scene-animations-disabled .scene-subtitle-word {
    opacity: 1 !important;
    translate: 0 0 !important;
    filter: blur(0) !important;
}

@keyframes scene-subtitle-word-in {
    0% {
        opacity: 0;
        translate: 0 0.32em;
        filter: blur(3px);
    }

    100% {
        opacity: 1;
        translate: 0 0;
        filter: blur(0);
    }
}

.object-center {
    object-position: center;
}

.object-top {
    object-position: center top;
}

.object-bottom {
    object-position: center bottom;
}

.object-left {
    object-position: 30% center;
}

.object-right {
    object-position: 70% center;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-ExtraLight.ttf') format('truetype');
    font-weight: 200;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-Light.ttf') format('truetype');
    font-weight: 300;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-Regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-Medium.ttf') format('truetype');
    font-weight: 500;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-SemiBold.ttf') format('truetype');
    font-weight: 600;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-Bold.ttf') format('truetype');
    font-weight: 700;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-ExtraBold.ttf') format('truetype');
    font-weight: 800;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-Black.ttf') format('truetype');
    font-weight: 900;
}


.touch-pan-y {
    touch-action: pan-y;
}

@keyframes notification-in {
    from {
        opacity: 0;
        transform: translateX(24px) scale(0.96);
        filter: blur(4px);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }

}

@keyframes notification-out {

    from {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }

    to {
        opacity: 0;
        transform: translateX(24px) scale(0.96);
        filter: blur(4px);
    }

}

.animate-notification-in {
    animation: notification-in 0.22s ease-out both;
}

.animate-notification-out {
    animation: notification-out 0.22s ease-in both;
    pointer-events: none;
}

@keyframes complete-scene-backdrop-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes complete-scene-card-in {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.96);
        filter: blur(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes complete-scene-hero-in {
    from {
        opacity: 0;
        transform: translateY(36px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.complete-scene-modal-backdrop {
    animation: complete-scene-backdrop-in 0.24s ease-out both;
}

.complete-scene-modal-card {
    animation: complete-scene-card-in 0.42s cubic-bezier(.16, .84, .24, 1) both;
    transform-origin: center bottom;
}

.complete-scene-modal-hero {
    animation: complete-scene-hero-in 0.52s 0.08s cubic-bezier(.2, .9, .24, 1) both;
    transform-origin: center bottom;
}

@keyframes coin-toast-enter {
    0% {
        opacity: 0;
        transform: translateY(-28px) scale(0.82) rotateX(-18deg);
        filter: blur(10px);
    }

    16% {
        opacity: 1;
        transform: translateY(4px) scale(1.04) rotateX(0deg);
        filter: blur(0);
    }

    28%,
    72% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-22px) scale(0.96);
        filter: blur(6px);
    }
}

@keyframes coin-toast-shine {
    0% {
        opacity: 0;
        transform: translateX(-140%) skewX(-24deg);
    }

    20%,
    100% {
        opacity: 0.9;
        transform: translateX(180%) skewX(-24deg);
    }
}

@keyframes coin-toast-glow {
    0%,
    100% {
        transform: scale(0.92);
        opacity: 0.45;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.85;
    }
}

@keyframes coin-toast-particle {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.3);
    }

    18% {
        opacity: 0.95;
    }

    100% {
        opacity: 0;
        transform: translate3d(var(--coin-x), var(--coin-y), 0) scale(1);
    }
}

.coin-toast {
    position: relative;
    display: flex;
    min-width: 260px;
    max-width: min(420px, calc(100vw - 32px));
    align-items: center;
    gap: 14px;
    overflow: hidden;
    border-radius: 28px;
    padding: 16px 22px;
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.22);
    backdrop-filter: blur(18px);
    animation: coin-toast-enter 2.6s cubic-bezier(.22, .88, .24, 1) forwards;
    transform-origin: center top;
    isolation: isolate;
}

.coin-toast--gain {
    color: #1f2937;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.48), transparent 55%),
        linear-gradient(135deg, #ffe78a 0%, #ffca3a 46%, #ffb703 100%);
    border: 1px solid rgba(255, 255, 255, 0.58);
}

.coin-toast--loss {
    color: #ffffff;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.16), transparent 55%),
        linear-gradient(135deg, #374151 0%, #111827 60%, #030712 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.coin-toast__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.coin-toast__value {
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.coin-toast__title {
    margin-top: 4px;
    font-size: 0.86rem;
    font-weight: 800;
    opacity: 0.8;
}

.coin-toast__badge {
    position: relative;
    z-index: 2;
    display: flex;
    height: 52px;
    width: 52px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-size: 1.35rem;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 12px 28px rgba(17, 24, 39, 0.14);
}

.coin-toast--gain .coin-toast__badge {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 244, 204, 0.92) 100%);
    color: #b45309;
}

.coin-toast--loss .coin-toast__badge {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
    color: #fca5a5;
}

.coin-toast__glow {
    position: absolute;
    inset: auto;
    left: 50%;
    top: 50%;
    z-index: 0;
    height: 120%;
    width: 70%;
    border-radius: 9999px;
    transform: translate(-50%, -50%);
    filter: blur(28px);
    animation: coin-toast-glow 1.6s ease-in-out infinite;
}

.coin-toast--gain .coin-toast__glow {
    background: rgba(255, 244, 173, 0.8);
}

.coin-toast--loss .coin-toast__glow {
    background: rgba(248, 113, 113, 0.22);
}

.coin-toast__shine {
    position: absolute;
    inset: -20% auto -20% -10%;
    z-index: 1;
    width: 44%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.18) 45%, rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0.18) 55%, transparent 100%);
    transform: skewX(-24deg);
    animation: coin-toast-shine 2.6s ease-out forwards;
    pointer-events: none;
}

.coin-toast__particle {
    position: absolute;
    z-index: 1;
    left: 22%;
    top: 50%;
    font-size: 0.55rem;
    line-height: 1;
    opacity: 0;
    animation: coin-toast-particle 1.2s ease-out forwards;
}

.coin-toast--gain .coin-toast__particle {
    color: rgba(255, 248, 216, 0.98);
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.55);
}

.coin-toast--loss .coin-toast__particle {
    color: rgba(252, 165, 165, 0.92);
    text-shadow: 0 0 14px rgba(248, 113, 113, 0.35);
}

.coin-toast__particle--1 {
    --coin-x: -34px;
    --coin-y: -38px;
    animation-delay: 0.08s;
}

.coin-toast__particle--2 {
    --coin-x: 12px;
    --coin-y: -54px;
    animation-delay: 0.14s;
}

.coin-toast__particle--3 {
    --coin-x: 54px;
    --coin-y: -24px;
    animation-delay: 0.2s;
}

.coin-toast__particle--4 {
    --coin-x: 34px;
    --coin-y: 10px;
    animation-delay: 0.12s;
}

.coin-toast__particle--5 {
    --coin-x: -10px;
    --coin-y: 22px;
    animation-delay: 0.18s;
}

@keyframes coin-reward-shell-in {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.9);
        filter: blur(10px);
    }

    16% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }

    24%,
    72% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-18px) scale(0.96);
        filter: blur(6px);
    }
}

@keyframes coin-reward-panel-sway {
    0% {
        transform: rotate(-4deg) translateY(0);
    }

    25% {
        transform: rotate(3deg) translateY(-2px);
    }

    50% {
        transform: rotate(5deg) translateY(0);
    }

    75% {
        transform: rotate(-2deg) translateY(2px);
    }

    100% {
        transform: rotate(-4deg) translateY(0);
    }
}

@keyframes coin-reward-mascot-float {
    0% {
        transform: translateY(0) scale(0.96);
    }

    14% {
        transform: translateY(-3px) scale(1.02);
    }

    28% {
        transform: translateY(0) scale(0.97);
    }

    42% {
        transform: translateY(-4px) scale(1.045);
    }

    56% {
        transform: translateY(0) scale(0.985);
    }

    70% {
        transform: translateY(-2px) scale(1.015);
    }

    100% {
        transform: translateY(0) scale(0.96);
    }
}

.coin-reward-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    animation: coin-reward-shell-in 2.8s cubic-bezier(.22, .88, .24, 1) infinite;
}

.coin-reward-panel {
    animation: none;
    transform-origin: center bottom;
    animation: coin-reward-panel-sway 2.2s ease-in-out infinite;
}

.coin-reward-mascot {
    width: min(280px, 52vw);
    max-width: 280px;
    filter: drop-shadow(0 26px 50px rgba(0, 0, 0, 0.26));
    animation: coin-reward-mascot-float 3.2s ease-in-out infinite;
}

.coin-reward-backdrop {
    position: absolute;
    inset: auto;
    top: 52%;
    left: 50%;
    width: min(420px, 72vw);
    height: min(420px, 72vw);
    border-radius: 9999px;
    background:
        radial-gradient(circle, rgba(255, 210, 94, 0.42) 0%, rgba(255, 202, 58, 0.16) 42%, rgba(255, 202, 58, 0) 74%);
    transform: translate(-50%, -50%);
    filter: blur(42px);
    opacity: 0.95;
    z-index: -1;
}

@media (max-width: 640px) {
    #scene_subtitles {
        font-size: calc(1rem * var(--scene-subtitle-font-scale));
    }

    .coin-toast {
        min-width: 0;
        gap: 12px;
        padding: 14px 18px;
    }

    .coin-toast__badge {
        height: 46px;
        width: 46px;
        font-size: 1.2rem;
    }

    .coin-toast__value {
        font-size: 1.35rem;
    }

    .coin-reward-shell {
        gap: 14px;
    }

    .coin-reward-mascot {
        width: min(220px, 60vw);
    }
}

.active{
    font-weight: bold;
}


#resizable {
    width: 100%;
    height: 100%; 
    transition: none !important;
}

/* width */
::-webkit-scrollbar {
    width: 3px;
}

/* Track */
::-webkit-scrollbar-track {
    background: #D9D9D920;
    border-radius: 10px;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #D9D9D9;
    border-radius: 10px
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #404040eb;
}


@keyframes cloudFloat {
    0% {
        transform: translateY(0px) translateX(0px);
    }

    25% {
        transform: translateY(-8px) translateX(3px);
    }

    50% {
        transform: translateY(-15px) translateX(0px);
    }

    75% {
        transform: translateY(-8px) translateX(-3px);
    }

    100% {
        transform: translateY(0px) translateX(0px);
    }

}

.cloud-float {
    transition: all 0.3s ease;
    animation: cloudFloat var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

.cloud-repel {
    display: inline-block;
    will-change: transform;
}
