/* PRELOADER VANILLA CSS implementation */
.kinetic-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 2rem;
    user-select: none;
    background-color: #0e0e0e;
    color: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
    overflow: hidden;
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), visibility 1s;
}

.kinetic-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.preloader-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(185, 10, 252, 0.05), #0e0e0e 70%);
}

.preloader-scanline {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(185, 10, 252, 0.02) 50%);
    background-size: 100% 4px;
    opacity: 0.4;
}

.preloader-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
}

.preloader-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    opacity: 0.6;
}

.header-left h1 {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
    margin: 0;
}

.header-left p, .header-right p {
    font-family: monospace;
    font-size: 0.625rem;
    color: #00eefc;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0.25rem 0 0;
}

.header-right {
    text-align: right;
}

.header-right p {
    color: #adaaaa;
    letter-spacing: 0.1em;
}

.preloader-core {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    position: relative;
}

.ring-outer {
    position: absolute;
    width: 400px;
    height: 400px;
    border: 1px solid rgba(222, 142, 255, 0.1);
    border-radius: 50%;
    animation: spin 10s linear infinite;
}

.ring-inner {
    position: absolute;
    width: 360px;
    height: 360px;
    border-top: 2px solid rgba(0, 238, 252, 0.2);
    border-bottom: 2px solid rgba(0, 238, 252, 0.2);
    border-radius: 50%;
    animation: spin-reverse 6s linear infinite;
}

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

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

.scanner-container {
    position: relative;
    width: 16rem;
    height: 16rem;
    background-color: #131313;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(185, 10, 252, 0.1);
    overflow: hidden;
}

.scanner-bg {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    background-size: cover;
    background-position: center;
    background-image: url('https://lh3.googleusercontent.com/aida-public/AB6AXuASl1eGHscxdvWPmJA_g_o1CFBkluwSLIhaU5ITDEEjrSE-pYUGVd8OMjUm2DktKQuaFsN6cGD0buxG-W7mX94kSoEwKXi4_qZbRU2AWap3-ZvDCSdNsOiSqEe96hzz6iPFoW7i6GHvkZApxCvEcu5EEEEgKYcxnTe4NN4zOKGoVORKg_kDM7f0emTbgh13gp-grgFDInErvqcJF1J8sPonAul6WX-tIxSHox6Scqp_B8f-yPah7qTUC6cXwq1h5eRYqYOSz2cfC2U');
}

.scanner-laser {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to bottom, transparent, rgba(0, 238, 252, 0.4), transparent);
    opacity: 0.5;
    filter: blur(2px);
    animation: bounce 3s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(100%); }
}

.scanner-content {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preloader-icon {
    font-size: 3.75rem;
    color: #de8eff;
}

.loading-stats {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loading-percentage {
    font-family: monospace;
    font-size: 2.5rem;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: -0.05em;
}

.loading-percentage span:last-child {
    color: #00deec;
    font-size: 1.5rem;
}

.loading-bar-track {
    width: 8rem;
    height: 2px;
    background-color: #262626;
    margin-top: 0.5rem;
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background-color: #de8eff;
    transition: width 0.1s linear;
}

.status-readouts {
    margin-top: 4rem;
    text-align: center;
}

.status-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #00eefc;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

.status-title p {
    font-size: 1.125rem;
    letter-spacing: 0.15em;
    font-weight: 500;
    margin: 0;
}

.status-logs p {
    font-family: monospace;
    font-size: 0.6875rem;
    color: #adaaaa;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0.25rem 0;
}

.log-1 { opacity: 0.8; }
.log-2 { opacity: 0.4; }
.log-3 { opacity: 0.2; }

.preloader-footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    border-top: 1px solid rgba(72, 72, 71, 0.1);
    padding-top: 2rem;
    width: 100%;
}

@media (min-width: 768px) {
    .preloader-footer {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-title {
    font-family: monospace;
    font-size: 0.625rem;
    color: #00eefc;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin: 0;
}

.integrity-bars {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    width: 150px;
}

.integrity-bars div {
    height: 4px;
    background-color: rgba(0, 238, 252, 0.8);
}

.integrity-bars div.dim {
    background-color: #262626;
}

.footer-sub {
    font-family: monospace;
    font-size: 0.5625rem;
    color: #adaaaa;
    margin: 0;
}

.footer-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-group {
    display: flex;
    gap: 1rem;
}

.icon-box {
    padding: 0.75rem;
    background-color: #20201f;
    border-radius: 0.125rem;
    border-top: 1px solid;
    display: flex;
}

.icon-box.border-secondary { border-color: rgba(0, 238, 252, 0.1); }
.icon-box.border-primary { border-color: rgba(222, 142, 255, 0.1); }
.icon-box.border-white { border-color: rgba(255, 255, 255, 0.2); }

.icon-box .text-secondary { color: #00eefc; }
.icon-box .text-primary { color: #de8eff; }
.icon-box .text-white { color: #ffffff; }

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    text-align: right;
}

.footer-right p:not(.footer-title) {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
}

.glimmer-h, .glimmer-v-left, .glimmer-v-right {
    position: fixed;
    z-index: 20;
    pointer-events: none;
}

.glimmer-h {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(222, 142, 255, 0.2), transparent);
}

.glimmer-v-left {
    top: 0;
    left: 25%;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 238, 252, 0.1), transparent);
}

.glimmer-v-right {
    top: 0;
    right: 25%;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 238, 252, 0.1), transparent);
}
