* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: #ffffff;
    background:
        url("../assets/background.svg")
        center center / cover
        no-repeat fixed;
    overflow: hidden;
}

.page-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 16, 26, 0.18);
    pointer-events: none;
}

.logo {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 300px;
    max-width: 38vw;
    height: auto;
    z-index: 2;
}

.panel {
    position: fixed;
    left: 50%;
    top: 53%;
    transform: translate(-50%, -50%);
    width: 440px;
    max-width: calc(100vw - 36px);
    z-index: 2;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

label {
    display: block;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-shadow:
        1px 1px 3px #000,
        0 0 4px #000;
}

.text-input {
    width: 100%;
    height: 56px;
    padding: 8px 14px;
    border: 2px solid #252525;
    border-radius: 11px;
    outline: none;
    background: rgba(255, 255, 255, 0.97);
    font-size: 22px;
    color: #111;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.25);
}

.text-input:focus {
    border-color: #f58220;
}

.file-input {
    width: 100%;
    padding: 13px;
    border: 2px solid #252525;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.97);
    color: #111;
    font-size: 16px;
}

.button-row {
    margin-top: 6px;
    text-align: right;
}

button {
    padding: 15px 24px;
    border: 0;
    border-radius: 9px;
    background: #f58220;
    color: #465158;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.34);
}

button:hover {
    background: #ff922f;
}

button:disabled {
    cursor: default;
    opacity: 0.75;
}

.status,
.counter,
.message,
.result {
    margin-top: 18px;
    padding: 13px 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.68);
    text-shadow: 1px 1px 2px #000;
}

.counter {
    margin-top: 10px;
    text-align: right;
    font-size: 14px;
}

.message.error {
    background: rgba(125, 0, 0, 0.84);
    font-weight: 700;
}

.result {
    padding: 16px;
    font-family: monospace;
    font-size: 26px;
    word-break: break-word;
    white-space: pre-wrap;
}

.logout-form {
    margin-top: 12px;
    text-align: right;
}

.logout {
    padding: 9px 15px;
    background: #555;
    color: #fff;
    font-size: 14px;
    box-shadow: none;
}

.wait-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.72);
    align-items: center;
    justify-content: center;
}

.wait-overlay.visible {
    display: flex;
}

.wait-box {
    min-width: 280px;
    padding: 30px 42px;
    border-radius: 12px;
    background: rgba(10, 20, 25, 0.95);
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
}

.spinner {
    width: 58px;
    height: 58px;
    margin: 0 auto 20px;
    border: 6px solid rgba(255, 255, 255, 0.25);
    border-top-color: #f58220;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.wait-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}

.wait-text {
    margin-top: 7px;
    font-size: 16px;
    opacity: 0.9;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 700px) {
    .logo {
        width: 240px;
        max-width: 70vw;
    }

    .panel {
        top: 56%;
    }

    label {
        font-size: 20px;
    }

    .text-input {
        font-size: 19px;
    }
}
