:root {
    --bg: #06111d;
    --bg-soft: #0b1930;
    --bg-card: rgba(10, 25, 48, 0.78);
    --text: #f3f7ff;
    --muted: #a2b1c7;
    --border: rgba(108, 150, 214, 0.18);
    --primary: #20c7ff;
    --primary-2: #4de2d0;
    --white: #ffffff;
    --danger-bg: rgba(255, 229, 229, 0.96);
    --danger-text: #c62828;
    --success-bg: rgba(232, 247, 234, 0.96);
    --success-text: #1f7a35;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --transition: all 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: radial-gradient(circle at top left, rgba(32, 199, 255, 0.18), transparent 34%), radial-gradient(circle at top right, rgba(77, 226, 208, 0.12), transparent 30%), linear-gradient(135deg, var(--bg), var(--bg-soft));
    color: var(--text);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    justify-content: space-between;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    margin: 90px auto 24px auto;
    padding: 24px;
}

.login-card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 38px 30px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.brand-area {
    text-align: center;
    margin-bottom: 28px;
}

.brand-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.brand-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.brand-subtitle {
    font-size: 14px;
    color: var(--muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .form-group.recaptcha-group {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

        .form-group.recaptcha-group .g-recaptcha {
            margin-left: auto;
            margin-right: auto;
            transform-origin: center top;
        }

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.form-input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    font-size: 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    transition: var(--transition);
}

    .form-input::placeholder {
        color: rgba(243, 247, 255, 0.46);
    }

    .form-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(32, 199, 255, 0.14);
        background: rgba(255, 255, 255, 0.08);
    }

.login-button {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #06111d;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 4px;
    box-shadow: 0 16px 34px rgba(32, 199, 255, 0.24);
}

    .login-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 18px 42px rgba(32, 199, 255, 0.34);
    }

    .login-button:active {
        transform: scale(0.99);
    }

.login-error {
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto 14px auto;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid rgba(198, 40, 40, 0.24);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lang-switcher {
    position: fixed;
    top: 28px;
    right: 28px;
    z-index: 10050;
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-btn {
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

    .lang-btn:hover {
        border-color: var(--primary);
        transform: translateY(-2px);
    }

    .lang-btn.active {
        border-color: var(--primary);
        box-shadow: 0 0 0 2px rgba(32, 199, 255, 0.18);
    }

.lang-flag {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

.site-footer {
    border-top: 1px solid rgba(108, 150, 214, 0.12);
    padding: 14px 16px 12px;
    margin-top: 0;
    text-align: center;
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

.footer-center-title {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.footer-subtext {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.footer-flag {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
}

.hermes-captcha {
    width: 100%;
    max-width: 304px;
    height: 78px;
    margin: 0 auto;
    border: 1px solid rgba(32, 199, 255, 0.28);
    border-radius: 12px;
    background: linear-gradient(135deg, #06111d, #0b1930);
    padding: 0 14px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hermes-captcha-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 100%;
}

.hermes-captcha-check {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    flex: 1;
    min-width: 0;
    height: 100%;
}

    .hermes-captcha-check input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.hermes-captcha-custom-box {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 2px solid rgba(32, 199, 255, 0.65);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.96);
    display: inline-block;
    position: relative;
    transition: 0.2s ease;
}

.hermes-captcha-check input[type="checkbox"]:checked + .hermes-captcha-custom-box::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 3px;
    width: 7px;
    height: 14px;
    border: solid #2e7d32;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.hermes-captcha-text {
    font-size: 14px;
    color: #f3f7ff;
    line-height: 1.2;
    white-space: nowrap;
}

.hermes-captcha-brand {
    width: 138px;
    min-width: 138px;
    height: 54px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-align: left;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(108, 150, 214, 0.16);
}

.hermes-captcha-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.hermes-captcha-brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    line-height: 1.05;
}

.hermes-captcha-brand-title {
    font-size: 11px;
    font-weight: 700;
    color: #f3f7ff;
    line-height: 1.05;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0.1px;
}

.hermes-captcha-brand-subtitle {
    font-size: 9px;
    color: #4de2d0;
    line-height: 1.1;
    font-family: Arial, Helvetica, sans-serif;
    margin-top: 3px;
}

.hermes-captcha-status {
    display: none;
}

.hermes-captcha.verified {
    border-color: rgba(77, 226, 208, 0.55);
    background: linear-gradient(135deg, #06111d, #0b1930);
}

.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.support-link-row {
    margin-top: 5px;
    text-align: center;
}

.support-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.support-icon {
    font-size: 15px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.support-link:hover {
    opacity: 0.85;
    text-decoration: underline;
}

.login-success {
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto 14px auto;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid rgba(31, 122, 53, 0.24);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-link-row {
    margin-top: 4px;
    text-align: center;
}

@media (max-width: 768px) {
    .lang-switcher {
        top: 20px;
        right: 20px;
        gap: 6px;
    }

    .lang-btn {
        width: 40px;
        height: 40px;
    }

    .lang-flag {
        width: 20px;
        height: 20px;
    }

    .site-footer {
        padding: 12px 12px 10px;
    }

    .footer-center-title {
        font-size: 17px;
    }

    .footer-subtext {
        font-size: 15px;
    }

    .footer-flag {
        width: 20px;
        height: 20px;
    }

    .footer-title-row {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 20px;
    }

    .login-card {
        padding: 28px 20px;
        border-radius: 18px;
    }

    .brand-title {
        font-size: 24px;
    }

    .form-group.recaptcha-group .g-recaptcha {
        transform: scale(0.84);
    }
}
