/* BOOT SCREEN */
#boot-screen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease;
}
#boot-screen.hidden {
    opacity: 0;
    pointer-events: none;
}
.boot-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 48px;
}
.xp-flag-img {
    object-fit: contain;
}
.boot-flag-img {
    width: 90px;
    height: 90px;
    margin-bottom: 18px;
}
.boot-logo-text {
    font-style: italic;
    letter-spacing: -1px;
    line-height: 1.1;
    text-align: left;
}
.logo-firstname,
.logo-surname {
    display: block;
    color: #fff;
    font-size: clamp(30px, 5.5vw, 56px);
    font-weight: 700;
    font-style: italic;
}
.logo-xp {
    font-size: 0.48em;
    font-style: italic;
    font-weight: 700;
    vertical-align: super;
    background: linear-gradient(180deg, #FF9A00 0%, #FF6600 50%, #FF3300 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 3px;
}
.boot-subtitle {
    color: rgba(255,255,255,0.75);
    font-size: clamp(12px, 1.8vw, 16px);
    font-style: italic;
    margin-top: 6px;
    letter-spacing: 0.02em;
    align-self: flex-start;
    padding-left: 2px;
}
.loading-container {
    width: 216px; height: 18px;
    border: 1px solid #555; border-radius: 2px;
    overflow: hidden; background: #111; padding: 2px;
}
.loading-bar {
    display: flex; gap: 2px; height: 100%;
    animation: bootSlide 1.8s linear infinite;
}
.loading-bar span {
    width: 11px; height: 100%;
    background: linear-gradient(180deg, #5BB2F7, #2D7AD5, #1A5BAF);
    border-radius: 1px; flex-shrink: 0;
}
@keyframes bootSlide {
    0% { transform: translateX(-60px); }
    100% { transform: translateX(140px); }
}
.boot-footer-left {
    position: absolute; bottom: 28px; left: 28px;
    color: rgba(255,255,255,0.45); font-size: 11px; line-height: 1.6;
}
.boot-footer-right {
    position: absolute; bottom: 28px; right: 28px;
    color: rgba(255,255,255,0.45); font-size: 13px; font-style: italic; font-weight: 700;
}

/* LOGIN SCREEN */
#login-screen {
    position: fixed; inset: 0; z-index: 9999;
    display: none;
    flex-direction: column;
    transition: opacity 0.4s ease;
}
#login-screen.visible { display: flex; }
#login-screen.hidden { opacity: 0; pointer-events: none; }

.login-screen-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle, rgba(255,255,255,0.12) 0 1px, transparent 1px),
        linear-gradient(180deg, #5f92ea 0%, #78a8f4 48%, #6f9ff0 100%);
    background-size: 4px 4px, 100% 100%;
}
.login-top-bar {
    order: 1;
    flex: 0 0 100px;
    position: relative; z-index: 2;
    background:
        radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(180deg, #071782 0%, #0828a9 56%, #0735bd 100%);
    background-size: 4px 4px, 100% 100%;
    border-bottom: 1px solid rgba(255,255,255,0.32);
}
.login-bottom-bar {
    order: 3;
    flex: 0 0 112px;
    position: relative; z-index: 2;
    background:
        radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(180deg, #0735bd 0%, #0828a9 42%, #06137d 100%);
    background-size: 4px 4px, 100% 100%;
    border-top: 2px solid #d88000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 52px;
    gap: 20px;
}
.login-restart-btn {
    display: flex; align-items: center; gap: 10px;
    background: none; border: none; cursor: pointer;
    color: #fff; font-size: 16px; font-family: inherit;
    padding: 4px 8px; border-radius: 3px;
    transition: background 0.15s;
    white-space: nowrap;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.65);
}
.login-restart-btn:hover { background: rgba(255,255,255,0.1); }
.restart-icon-img { width: 31px; height: 31px; flex-shrink: 0; object-fit: contain; }
.login-footer-text {
    color: #fff;
    font-size: 14px; line-height: 1.55;
    text-align: right;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.7);
}
.login-center {
    order: 2;
    flex: 1;
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.login-panel {
    display: grid;
    grid-template-columns: minmax(280px, 390px) 1px minmax(280px, 390px);
    align-items: center;
    gap: 42px;
    max-width: 900px;
    width: calc(100% - 80px);
    padding: 0;
    transform: translateY(-10px);
}
.login-left {
    display: flex; flex-direction: column; align-items: center; gap: 0;
    text-align: center;
}
.login-flag-img {
    width: 112px;
    height: 92px;
    margin-bottom: 8px;
    align-self: center;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.28));
}
.login-brand {
    font-style: italic;
    letter-spacing: 0;
    line-height: 0.92;
    margin-bottom: 4px;
    text-align: center;
    text-shadow: 1px 2px 2px rgba(0,0,0,0.34);
}
.brand-firstname,
.brand-surname {
    display: block;
    color: #fff;
    font-size: clamp(31px, 3vw, 40px);
    font-weight: 700;
    font-style: italic;
    white-space: nowrap;
}
.brand-xp {
    font-size: 0.62em;
    font-style: italic;
    font-weight: 700;
    vertical-align: super;
    background: linear-gradient(180deg, #FF9A00, #FF6600, #FF3300);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 3px;
}
.login-brand-subtitle {
    color: #fff;
    font-size: 15px;
    font-style: italic;
    font-weight: 700;
    margin-bottom: 30px;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.46);
}
.login-hint {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}
.login-divider {
    width: 1px; height: 250px; flex-shrink: 0;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.34), transparent);
}
.login-right { display: flex; flex-direction: column; align-items: flex-start; }
.login-btn {
    display: flex; align-items: center; gap: 20px;
    background: transparent;
    border: 2px solid transparent; border-radius: 5px;
    padding: 8px 12px 8px 8px; cursor: pointer; transition: all 0.2s;
    min-width: 260px;
}
.login-btn:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.72);
    box-shadow: 0 0 0 1px rgba(42,87,189,0.36), 0 0 18px rgba(255,255,255,0.12);
}
.login-btn:active { transform: scale(0.98); }
.login-avatar {
    width: 68px; height: 68px;
    border-radius: 4px;
    border: 3px solid rgba(255,255,255,0.86);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.36);
}
.login-user-info { text-align: left; }
.login-user-name { margin-bottom: 4px; }
.user-firstname,
.user-surname {
    display: block;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.12;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.46);
}
.login-user-title {
    color: #111a78;
    font-size: 13px;
    font-weight: 700;
}

/* WELCOME SCREEN */
#welcome-screen {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    flex-direction: column;
    color: #fff;
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.55s ease;
}
#welcome-screen.visible { display: flex; }
#welcome-screen.hidden { opacity: 0; }
.welcome-screen-top,
.welcome-screen-bottom {
    flex: 0 0 11vh;
    min-height: 64px;
    background:
        radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(180deg, #06117b 0%, #061fa2 55%, #0629b4 100%);
    background-size: 4px 4px, 100% 100%;
}
.welcome-screen-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle, rgba(255,255,255,0.16) 0 1px, transparent 1px),
        linear-gradient(180deg, #6296ef 0%, #78a8f4 47%, #6da0f0 100%);
    background-size: 4px 4px, 100% 100%;
    border-top: 1px solid rgba(255,255,255,0.38);
    border-bottom: 2px solid #d78213;
}
.welcome-screen-text {
    color: #fff;
    font-size: clamp(30px, 3.1vw, 48px);
    font-weight: 700;
    font-style: italic;
    line-height: 1;
    text-shadow: 0 2px 2px rgba(0,0,0,0.18);
}

/* SHUTDOWN */
#shutdown-screen {
    position: fixed; inset: 0; z-index: 10001;
    background: #0A246A; display: none;
    flex-direction: column; align-items: center; justify-content: center;
    color: #fff; font-size: clamp(16px, 3vw, 24px);
}
#shutdown-screen.visible { display: flex; }
#shutdown-screen.fade-black { background: #000; }
.shutdown-text { animation: shutdownPulse 1.5s ease-in-out infinite; }
@keyframes shutdownPulse { 0%,100%{opacity:1}50%{opacity:0.4} }

@media (max-width: 650px) {
    .login-top-bar { flex-basis: 72px; }
    .login-bottom-bar { flex-basis: 80px; padding: 0 12px; }
    .login-panel {
        display: flex;
        flex-direction: column;
        gap: 24px;
        padding: 24px;
        width: 100%;
        transform: translateY(-4px);
    }
    .login-divider { width: 200px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent); }
    .login-left { align-items: center; }
    .login-flag-img { width: 82px; height: 68px; }
    .brand-firstname,
    .brand-surname { font-size: clamp(24px, 8vw, 34px); }
    .login-brand-subtitle { font-size: 13px; margin-bottom: 20px; }
    .login-hint { text-align: center; }
    .login-btn { min-width: 0; }
    .user-firstname,
    .user-surname { font-size: 20px; }
    .login-restart-btn { font-size: 13px; }
    .login-footer-text { display: none; }
}
