
:root {
    color-scheme: dark;
    --background: #050b16;
    --panel: rgba(10, 22, 40, 0.78);
    --blue: #61c8ff;
    --blue-light: #b3e8ff;
    --text: #f2f8ff;
    --muted: #7f94ad;
    --border: rgba(112, 190, 255, 0.17);
}

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

html {
    min-height: 100%;
    background: var(--background);
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Inter", sans-serif;
    color: var(--text);
    background:
        radial-gradient(ellipse at 50% 42%, #10243e 0%, transparent 48%),
        var(--background);
}

button,
a {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.background-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(110, 180, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(110, 180, 255, 0.07) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.ambient {
    position: fixed;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(110px);
    pointer-events: none;
    opacity: 0.16;
    animation: ambientFloat 8s ease-in-out infinite alternate;
}

.ambient-one {
    top: -140px;
    left: -100px;
    background: #087dff;
}

.ambient-two {
    right: -120px;
    bottom: -140px;
    background: #00c8ff;
    animation-delay: -4s;
}

.boot-screen {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 100vh;
    padding: 30px 24px 24px;
}

.top-status {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 1100px);
    color: #a7bfd9;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    animation: fadeDown 0.8s ease both;
}

.status-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #73ffd0;
    box-shadow: 0 0 12px rgba(115, 255, 208, 0.75);
    animation: pulse 1.8s ease-in-out infinite;
}

.status-version {
    margin-left: auto;
    color: #5f7896;
    letter-spacing: 1.4px;
}

.loading-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 520px);
    margin: 45px 0;
    padding: 38px 36px 30px;
    text-align: center;
    background: linear-gradient(
        145deg,
        rgba(14, 30, 51, 0.74),
        rgba(5, 13, 25, 0.63)
    );
    border: 1px solid var(--border);
    border-radius: 25px;
    box-shadow:
        0 25px 100px rgba(0, 0, 0, 0.28),
        inset 0 1px rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(18px);
    animation: panelAppear 1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.logo-container {
    position: relative;
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    margin-bottom: 30px;
}

.logo-ring {
    position: absolute;
    border: 1px solid rgba(97, 200, 255, 0.27);
    border-radius: 50%;
}

.ring-outer {
    inset: 0;
    border-top-color: var(--blue);
    border-right-color: transparent;
    animation: spin 8s linear infinite;
}

.ring-inner {
    inset: 11px;
    border-style: dashed;
    border-color: rgba(97, 200, 255, 0.18);
    animation: spinReverse 22s linear infinite;
}

.server-logo {
    position: relative;
    z-index: 1;
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 0 22px rgba(65, 177, 255, 0.27));
    animation: logoFloat 4s ease-in-out infinite;
}

.logo-fallback {
    display: none;
    place-items: center;
    width: 90px;
    height: 90px;
    border: 1px solid rgba(97, 200, 255, 0.4);
    border-radius: 22px;
    background: #0c2038;
    font-size: 38px;
    font-weight: 900;
    color: white;
    box-shadow: 0 0 45px rgba(49, 164, 255, 0.2);
}

.logo-fallback span {
    color: var(--blue);
}

.system-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 19px;
    color: var(--blue);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
}

.label-line {
    width: 22px;
    height: 1px;
    background: rgba(97, 200, 255, 0.45);
}

h1 {
    font-size: clamp(31px, 7vw, 47px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1.8px;
}

.brand-gradient {
    color: transparent;
    background: linear-gradient(100deg, #f5fbff 5%, #77d5ff 45%, #398dff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 24px rgba(77, 179, 255, 0.12));
}

.subtitle {
    margin-top: 12px;
    color: #9db1c9;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.loading-section {
    width: 100%;
    margin-top: 36px;
    text-align: left;
}

.loading-info {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
    color: #91a9c4;
    font-size: 10px;
    font-weight: 600;
}

#loadingPercent {
    color: var(--blue-light);
    font-variant-numeric: tabular-nums;
}

.progress-track {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 5px;
    border-radius: 20px;
    background: rgba(128, 176, 219, 0.13);
}

.progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #398dff, #70ddff);
    box-shadow: 0 0 14px rgba(97, 200, 255, 0.55);
    transition: width 120ms linear;
}

.progress-glow {
    position: absolute;
    top: 0;
    left: -35%;
    width: 25%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    opacity: 0.55;
    animation: barShine 1.5s linear infinite;
}

.system-log {
    display: flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    min-height: 18px;
    margin-top: 20px;
    color: #708ba9;
    font-size: 10px;
    text-align: left;
}

.log-prefix {
    color: var(--blue);
    font-weight: 900;
}

.terminal-cursor {
    width: 5px;
    height: 12px;
    background: var(--blue);
    animation: cursorBlink 0.9s steps(2) infinite;
}

.enter-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    min-height: 49px;
    margin-top: 26px;
    padding: 13px 20px;
    border: 1px solid rgba(124, 209, 255, 0.42);
    border-radius: 12px;
    background: linear-gradient(100deg, #174a7c, #176ca4);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.3px;
    box-shadow: 0 7px 25px rgba(0, 121, 255, 0.12);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease,
        filter 0.25s ease;
}

.enter-button:hover {
    transform: translateY(-3px);
    border-color: #a3e2ff;
    filter: brightness(1.12);
    box-shadow:
        0 12px 35px rgba(0, 145, 255, 0.24),
        0 0 20px rgba(97, 200, 255, 0.09);
}

.enter-button:active {
    transform: translateY(0);
}

.button-arrow {
    font-size: 17px;
    transition: transform 0.25s ease;
}

.enter-button:hover .button-arrow {
    transform: translate(3px, -3px);
}

.redirect-note {
    margin-top: 15px;
    color: #60758d;
    font-size: 10px;
}

.boot-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: #526983;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.3px;
    text-align: center;
    animation: fadeUp 1s ease both;
}

.footer-separator {
    color: #2f8fd2;
}

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

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

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

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes ambientFloat {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(35px, 25px) scale(1.12); }
}

@keyframes barShine {
    from { left: -35%; }
    to { left: 110%; }
}

@keyframes cursorBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes panelAppear {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
    .boot-screen {
        padding: 22px 15px 18px;
    }

    .loading-panel {
        margin: 30px 0;
        padding: 30px 22px 24px;
        border-radius: 20px;
    }

    .logo-container {
        width: 125px;
        height: 125px;
        margin-bottom: 25px;
    }

    .server-logo {
        width: 82px;
        height: 82px;
    }

    h1 {
        letter-spacing: -1px;
    }

    .system-label {
        font-size: 8px;
        letter-spacing: 1.5px;
    }

    .boot-footer {
        gap: 7px;
        font-size: 8px;
        letter-spacing: 0.8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
