/* ============================================================
   CINEMATIC APP PRELOADER STYLES
   Fullscreen blueprint-style loader shown once per session
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700;800&family=Outfit:wght@800&display=swap');

#blueprint-loader-wrapper {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background-color: #001528;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
    background-position: center center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 5vh 5vw;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

#blueprint-loader-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, #001528 100%);
    pointer-events: none;
    z-index: 1;
}

/* Ambient pulse */
.ambient-pulse {
    position: absolute;
    width: 60vh;
    height: 60vh;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ambientPulseAnim 4s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes ambientPulseAnim {
    0%   { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* Decor Elements */
.decor-axis {
    position: absolute;
    opacity: 0.4;
    font-size: 10px;
    letter-spacing: 2px;
    z-index: 2;
}

.axis-y {
    top: 10%;
    left: 5%;
    height: 80%;
    border-left: 1px dashed rgba(255,255,255,0.3);
    padding-left: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.axis-x {
    bottom: 10%;
    left: 5%;
    width: 90%;
    border-bottom: 1px dashed rgba(255,255,255,0.3);
    padding-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.decor-scale {
    position: absolute;
    top: 5%;
    right: 5%;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 4px 8px;
    background: rgba(0,21,40,0.8);
    z-index: 2;
}

/* Top Section */
.bl-top {
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bl-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    animation: glitch 4s infinite;
}

.bl-logo-unity { color: #ffffff; text-shadow: 0 0 10px rgba(255,255,255,0.3); }
.bl-logo-kit   { color: #f97316; text-shadow: 0 0 15px rgba(249,115,22,0.6); }

.bl-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    letter-spacing: 4px;
    margin-top: 5px;
    position: relative;
}

.bl-subtitle::before,
.bl-subtitle::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1px;
    background: rgba(255,255,255,0.3);
}

.bl-subtitle::before { right: 100%; margin-right: 15px; }
.bl-subtitle::after  { left: 100%;  margin-left: 15px;  }

/* Center Section - 3D CUBE */
.bl-center {
    z-index: 10;
    position: relative;
    width: 150px;
    height: 150px;
    perspective: 1200px;
    margin-top: -5vh;
}

.cube-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    animation: rotateCube 15s linear infinite;
}

.cube-face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(249, 115, 22, 0.03);
    border: 2px solid rgba(249, 115, 22, 0.9);
    box-shadow: inset 0 0 20px rgba(249, 115, 22, 0.2), 0 0 15px rgba(249, 115, 22, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

/* Inner cross grid on faces */
.cube-face::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(249, 115, 22, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(249, 115, 22, 0.4) 1px, transparent 1px);
    background-size: 37.5px 37.5px;
    background-position: center center;
}

.front  { transform: rotateY(  0deg) translateZ(75px); }
.back   { transform: rotateY(180deg) translateZ(75px); }
.right  { transform: rotateY( 90deg) translateZ(75px); }
.left   { transform: rotateY(-90deg) translateZ(75px); }
.top    { transform: rotateX( 90deg) translateZ(75px); }
.bottom { transform: rotateX(-90deg) translateZ(75px); }

@keyframes rotateCube {
    0%   { transform: rotateX(0deg)   rotateY(0deg)   rotateZ(0deg); }
    100% { transform: rotateX(360deg) rotateY(720deg) rotateZ(360deg); }
}

/* Floating Markers around Cube */
.marker {
    position: absolute;
    color: #ffffff;
    font-size: 10px;
    background: rgba(0,21,40,0.8);
    padding: 2px 4px;
    border: 1px solid rgba(255,255,255,0.3);
    z-index: 15;
    white-space: nowrap;
    pointer-events: none;
}

.m-1 { top: -30px; left: -50px; }
.m-1::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 100%;
    width: 50px;
    height: 1px;
    background: rgba(255,255,255,0.5);
    transform-origin: 0 0;
    transform: rotate(35deg);
}

.m-2 { bottom: -10px; right: -70px; }
.m-2::before {
    content: '';
    position: absolute;
    bottom: 50%;
    right: 100%;
    width: 50px;
    height: 1px;
    background: rgba(255,255,255,0.5);
    transform-origin: 100% 0;
    transform: rotate(-15deg);
}

.m-3 { top: 50%; left: -80px; }
.m-3::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 40px;
    height: 1px;
    background: rgba(255,255,255,0.5);
}

/* Bottom Section */
.bl-bottom {
    z-index: 10;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bl-status-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.bl-status-text {
    color: #e2e8f0;
    font-size: 0.85rem;
    text-shadow: 0 0 5px rgba(255,255,255,0.3);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bl-status-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bl-status-line::before {
    content: '>';
    color: #f97316;
}

.bl-progress-label {
    color: #f97316;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(249,115,22,0.4);
}

.bl-progress-wrapper {
    width: 100%;
    height: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 2px;
    position: relative;
}

.bl-progress-bar {
    height: 100%;
    width: 0%;
    background-color: #f97316;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.2) 10px,
        rgba(0, 0, 0, 0.2) 20px
    );
    box-shadow: 0 0 15px rgba(249,115,22,0.6);
    transition: width 0.1s linear;
    position: relative;
    overflow: hidden;
}

.bl-progress-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: scanBar 1.5s linear infinite;
}

@keyframes scanBar {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.preloader-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}

/* Glitch effect for logo */
@keyframes glitch {
    0%  { text-shadow: 0 0 10px rgba(255,255,255,0.3); }
    98% { text-shadow: 0 0 10px rgba(255,255,255,0.3); transform: translate(0,0); }
    99% { text-shadow: -2px 0 red, 2px 0 cyan; transform: translate(-2px, 1px); }
    100%{ text-shadow: 0 0 10px rgba(255,255,255,0.3); transform: translate(0,0); }
}

/* Data dots flowing */
.data-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 8px #ffffff;
    z-index: 1;
    opacity: 0;
}

.data-dot.orange {
    background: #f97316;
    box-shadow: 0 0 8px #f97316;
}
