* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Lato, sans-serif;
    color: white;
}

body {
    font-size: clamp(1em, 1cqw + 1em, 3em);
    line-height: 1.5;
    color: #333;
    margin: 0;
    background-color: #141418;
}

.screen {
    display: flex;
    flex-flow: column;
    height: 100svh;
    padding: 1em 0;
}

.header {
    flex: 0 1 auto;
    display: flex;
    justify-content: center;
    gap: 0.3em;
}

.header .app_name {
    display: flex;
    font-family: Oswald, sans-serif;
    font-weight: 500;
    justify-content: center;
    align-items: center;
    gap: 0.5em;
    font-size: 1em;
}

.header .app_name img {
    width: clamp(1.5em, 2cqw + 1em, 2em);
}

.header .back {
    font-size: 1.3em;
    font-family: system-ui;
    position: absolute;
    left: 0.5em;
}

.content_container {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1em 1.4em;
    gap: 1.2em;
}

.content .description {
    font-size: 0.8em;
}

.content .description .description_part {
    color: #ABABAF;
}

.content .description strong {
    font-size: 1.2em;
    padding-left: 0.3em;
}

.content .description .description_part.title {
    font-weight: bold;
    color: white;
    font-size: 1.2em;
    margin-bottom: 0.2em;
}

.content .description .description_part.footer {
    font-weight: bold;
    font-size: 0.9em;
    margin-top: 1em;
}

.precheck-flow,
.activation-flow {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.precheck-card {
    width: 100%;
    background: radial-gradient(circle at top right, #2f2c4c, #1c1c24 60%);
    border: 1px solid #3a3a4a;
    border-radius: 1em;
    padding: 1em;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.precheck-title {
    font-family: Oswald, sans-serif;
    font-size: 1.15em;
    margin-bottom: 0.35em;
}

.precheck-subtitle {
    color: #b8b8c3;
    font-size: 0.86em;
}

.progress-wrap {
    margin-top: 0.9em;
    display: flex;
    align-items: center;
    gap: 0.75em;
}

.progress-bar {
    flex: 1;
    height: 0.75em;
    border-radius: 999px;
    background: #2a2a31;
    overflow: hidden;
}

.progress-fill {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #00c48c, #5a9bff);
    transition: width 0.16s ease-out;
}

.progress-value {
    min-width: 3ch;
    text-align: right;
    font-weight: 700;
    color: #ecf4ff;
}

.precheck-result {
    margin: 0.65em 0 0.8em;
    font-size: 0.92em;
    color: #dce7ff;
}

.scan-confirm-button {
    min-width: 7em;
    padding: 0.55em 0.9em;
    text-align: center;
    background: #1f8a63;
    border-radius: 0.7em;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1em;
}

.scan-confirm-button:active {
    transform: translateY(1px);
}

.content .button {
    background: linear-gradient(90deg, #2fbe72, #2097d8);
    width: 15em;
    height: 3em;
    border-radius: 1em;
    color: white;
    text-align: center;
    padding: 0.75em;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(33, 136, 102, 0.35);
    margin-top: 1em;
}

.content .button.disabled {
    background-color: grey;
}

.content .error {
    text-align: center;
    color: red;
}

.content .granted {
    text-align: center;
    color: lime;
}

.loading-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: #ABABAF;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #2A2A2E;
    border-top: 4px solid #A14DFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.loading-text {
    font-size: 0.9em;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    color: #FF4D4D;
    text-align: center;
    padding: 10px;
    margin: 10px 0;
    display: none;
    font-size: 0.9em;
}

.error-message:not(:empty) {
    display: block;
}

.header img {
    border-radius: 10em;
    width: 1.6em;
}

@media (min-width: 768px) {
    body {
        font-size: clamp(1em, 3cqw + 1em, 3em);
    }
}
