* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #1d1d1f;
    background:
        linear-gradient(rgba(0, 91, 156, 0.378), rgba(0, 91, 156, 0.329)),
        url(../img/index2-background-test1.jpg) center/cover no-repeat;
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.inner-area {
    width: 100%;
    max-width: 860px;
    background: #ffffff;
    border-radius: 2px;
    box-shadow: 0 20px 52px rgba(6, 30, 58, 0.36);
    padding: 32px 34px 30px;
    text-align: center;
}

.page-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    margin-bottom: 10px;
}

.title {
    margin: 0 0 14px;
    font-size: 35px;
    line-height: 1.2;
    font-weight: 700;
    color: #222;
}

.member-flags-welcome {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 0 0 18px;
    flex-wrap: wrap;
}

.flag-item-welcome {
    text-align: center;
}

.flag-emoji-welcome {
    font-size: 30px;
    display: block;
    margin-bottom: 3px;
}

.flag-label {
    font-size: 11px;
    color: #4d4d4d;
}

.subtitle {
    margin: 0 0 16px;
    color: #4d4d4d;
    font-size: 16px;
}

.lang {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.lang-item {
    position: relative;
    overflow: hidden;
    min-height: 94px;
    border: 1px solid #d6d6d6;
    border-radius: 2px;
    background: #ffffff;
    color: #146ea9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.lang-name {
    font-size: 22px;
    line-height: 1.1;
    font-weight: 600;
    transition: opacity 0.16s ease;
}

.lang-native {
    font-size: 14px;
    line-height: 1.2;
    transition: opacity 0.16s ease;
}

.lang-item::after {
    content: attr(data-welcome);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.lang-item:hover,
.lang-item:focus-visible {
    background: #146ea9;
    border-color: #146ea9;
    outline: none;
}

.lang-item:hover .lang-name,
.lang-item:hover .lang-native,
.lang-item:focus-visible .lang-name,
.lang-item:focus-visible .lang-native {
    opacity: 0;
}

.lang-item:hover::after,
.lang-item:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.footer-area {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.footer-text {
    background-color: #f4f4f4;
    color: #202020;
    font-size: 11px;
    border-radius: 2px;
    border: 1px solid #d5d5d5;
    padding: 8px 6px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.footer-text:hover {
    background-color: #146ea9;
    color: #ffffff;
    border-color: #146ea9;
}

@media screen and (max-width: 640px) {
    .container {
        padding: 16px;
    }

    .inner-area {
        padding: 24px 18px 20px;
    }

    .title {
        font-size: 26px;
    }

    .lang {
        grid-template-columns: 1fr;
    }

    .lang-item {
        min-height: 82px;
    }

    .lang-name {
        font-size: 20px;
    }

    .footer-area {
        grid-template-columns: 1fr;
    }
}