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

html, body {
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #e6f0ff;
    color: #1f1f1f;
}

/* Экраны */

.screen {
    display: none;
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.38s ease;
}

.screen.active {
    display: flex;
    opacity: 1;
}

/* Карточки */

.card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(32, 56, 117, 0.16);
}

/* Экран 1 */

.card-loading {
    padding: 32px 24px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    background: #ffffff;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
}

.logo span:first-child {
    color: #005ff9;
}

.logo span:last-child {
    color: #ff2d55;
}

.title-main {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.subtext {
    margin-top: 4px;
    font-size: 15px;
    color: #5c6470;
}

.dots {
    margin-top: 20px;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 4px;
    border-radius: 50%;
    background: #d3d7e1;
    animation: blink 1.4s infinite ease-in-out;
}

.dot:nth-child(2) { animation-delay: .2s; }
.dot:nth-child(3) { animation-delay: .4s; }

@keyframes blink {
    0%, 80%, 100% { opacity: .3; }
    40% { opacity: 1; }
}

/* Экран 2 — логин */

.page-login {
    max-width: 900px;
    width: 100%;
    display: flex;
    gap: 24px;
    align-items: stretch;
}

.login-card-wrap {
    flex: 3;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.card-login {
    padding: 32px 30px 24px;
    min-width: 360px;
}

.logo-login {
    margin-bottom: 16px;
}

.lang-row {
    font-size: 13px;
    color: #5c6470;
    margin-bottom: 18px;
}

.flag {
    font-size: 16px;
    margin-left: 6px;
}

.field-label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
}

.input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d5d9e2;
    font-size: 14px;
    margin-bottom: 14px;
    outline: none;
    background: #fdfdff;
}

.input:focus {
    border-color: #005ff9;
    box-shadow: 0 0 0 1px rgba(0, 95, 249, 0.2);
}

.btn-primary {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    background: #005ff9;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin: 6px 0 10px;
}

.btn-primary:active {
    transform: translateY(1px);
}

.link {
    font-size: 13px;
    color: #005ff9;
    text-decoration: none;
}

.restore-link {
    display: inline-block;
    margin-bottom: 6px;
}

.small-text {
    font-size: 13px;
    color: #7a8190;
}

.small-problem {
    text-align: center;
    margin: 6px 0 10px;
}

.alt-login {
    margin-top: 4px;
    display: flex;
    gap: 8px;
}

.alt-btn {
    flex: 1;
    border-radius: 8px;
    border: 1px solid #d5d9e2;
    padding: 8px 10px;
    background: #ffffff;
    font-size: 13px;
    cursor: pointer;
}

.alt-more {
    margin-top: 8px;
}

.register-link {
    display: block;
    margin-top: 14px;
    text-align: center;
}

/* Правая подсказка */

.card-tip {
    flex: 2;
    padding: 18px 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-size: 14px;
    color: #3f4a5a;
    border-left: 4px solid #005ff9;
}

.tip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.tip-icon {
    font-size: 22px;
}

.tip-title {
    font-weight: 600;
}

.tip-text {
    font-size: 13px;
    color: #5c6470;
}

/* Экран 3 — псевдо-взлом */

.hack-wrapper {
    max-width: 960px;
    width: 100%;
    background: #020711;
    color: #16ff7d;
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.6);
    padding: 16px;
    font-family: "SF Mono", "Fira Code", monospace;
}

#hack-header {
    font-size: 13px;
    color: #7ef5c7;
    margin-bottom: 10px;
}

#code-area {
    height: 360px;
    overflow-y: auto;
    background: #000309;
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
}

#joke {
    margin-top: 12px;
    font-size: 13px;
    color: #fefefe;
    text-align: right;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#joke.visible {
    opacity: 1;
}

/* Адаптив */

@media (max-width: 900px) {
    .page-login {
        flex-direction: column;
        max-width: 420px;
    }

    .card-tip {
        border-left: none;
        border-top: 4px solid #005ff9;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .card-login {
        padding: 24px 20px 20px;
        min-width: auto;
    }

    .card-tip {
        display: none; /* как мобильная версия: правого блока нет */
    }
}

.support-block {
    width: 100%;
    max-width: 600px;
    margin: 40px auto 0 auto;
    padding: 18px 22px;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    text-align: center;
    font-size: 18px;
    color: #222;
    line-height: 1.5;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.support-block a {
    color: #0a68ff;
    font-weight: 600;
    text-decoration: none;
}
.support-block a:hover {
    text-decoration: underline;
}
/* ======= MOBILE ADAPTATION ======= */
@media screen and (max-width: 600px) {

    .support-block {
        max-width: 90%;
        margin: 20px auto 10px auto;
        padding: 14px 16px;
        font-size: 15px;
        line-height: 1.4;
        border-radius: 10px;
    }

    .support-block a {
        font-size: 16px;
    }

    .hack-wrapper {
        padding: 10px;
    }

    #code-area {
        font-size: 13px;
        line-height: 1.3;
        padding: 12px;
    }

    .terminal-container img,
    .terminal-container {
        max-width: 100%;
        margin: 0 auto;
        border-radius: 10px !important;
    }
}
