/* __V3D_TEMPLATE__ - template-based file; delete this line to prevent this file from being updated */

body {
    margin: 0px;
    overflow: hidden;
}

noscript {
    display: block;
    text-align: center;
    padding-top: 100px;
    font-size: 20px;
}

.v3d-container {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
}

.fullscreen-button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    background-size: 100% 100%;
    display: none;
    z-index: 1;
}

.fullscreen-open {
    background-image: url('media/fullscreen_open.svg');
}

.fullscreen-close {
    background-image: url('media/fullscreen_close.svg');
}

/* removes tap blinking on ios devices */
* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Dark Theme */

.v3d-simple-preloader-background {
    background-color: #181818;
}

.v3d-simple-preloader-container {
    filter: drop-shadow(0px 0px 4px #bc2929);
}

.v3d-webgl-error {
    color: lightgray;
}

.v3d-floating-btn {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    translate: -50% -50%;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;

    /* Hidden labels must not keep their own compositing layer. */
    will-change: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Button dimensions and layout */
    height: 30px;
    box-sizing: border-box;
    padding: 0 10px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border-radius: 5px;
    border: none;

    /* Solid translucent fill avoids re-sampling the WebGL canvas every frame. */
    background: rgba(12, 14, 18, 0.78);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;

    /* Typography */
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    white-space: nowrap;

    cursor: pointer;
    outline: none;
    user-select: none;

    /* Position follows the scene directly; only visual state is animated. */
    transition: opacity 0.8s ease-in-out, visibility 0s linear 0.8s, background-color 0.25s ease;
}

.v3d-floating-btn:not(.fade-in) {
    visibility: hidden;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    will-change: auto;
}

/* White dot in regular state */
.v3d-floating-btn::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 1.2px;
    background-color: #ffffff;
    flex-shrink: 0;
    transition: background-color 0.25s ease, width 0.25s ease, height 0.25s ease;
}

/* Red line with glow at the bottom on hover */
.v3d-floating-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 8px;
    right: 8px;
    height: 1.5px;
    border-radius: 1px;
    background: linear-gradient(90deg, rgba(210, 58, 46, 0) 0%, #d23a2e 20%, #d23a2e 80%, rgba(210, 58, 46, 0) 100%);
    box-shadow: 0 1px 6px rgba(210, 58, 46, 0.75);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.v3d-floating-btn.fade-in {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.8s ease-in-out, visibility 0s, background-color 0.25s ease;
}

/* Hover state: 70% opacity, red dot, red bottom line */
.v3d-floating-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.v3d-floating-btn:hover::before {
    width: 6px;
    height: 6px;
    border-radius: 1.8px;
    background-color: #d23a2e;
}

.v3d-floating-btn:hover::after {
    opacity: 1;
}

.v3d-floating-btn.reset-btn {
    top: auto;
    bottom: 20px;
    left: 20px;
    translate: 0 0;
}

.v3d-floating-btn.load {
    top: auto;
    bottom: 20px;
    left: 120px;
    translate: 0 0;
}

.v3d-floating-btn.unload {
    top: auto;
    bottom: 20px;
    left: 220px;
    translate: 0 0;
}

.v3d-simple-preloader-logo {
    background-image: url('media/logo-kvant.svg');
}

.v3d-simple-preloader-bar {
    background: linear-gradient(90deg, #ad1414, #e04242);
    height: 3px;
    border-color: #c52b2b;
}

.v3d-simple-preloader-container {
    --v3d-preloader-img-width: 300px;
    --v3d-preloader-img-height: 300px;
}

/* Premium Vignette Overlay Effect */
.vignette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Cinematic radial-gradient that conforms to screen aspect ratio */
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.3) 70%, rgba(7, 3, 23, 0.9) 100%);
    pointer-events: none;
    /* Allows user to click and rotate 3D viewport behind the vignette */
    z-index: 2;
    /* Positioned above WebGL canvas/fullscreen button, but below floating buttons (z-index: 10) */
}
