* {
    box-sizing: border-box;
}

body.register-page {
    margin: 0;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: #e7eefc;
    min-height: 100vh;
    background: #090d15;
    overflow: hidden;
}

.register-bg {
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 50% 15%, rgba(255, 210, 140, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(7, 10, 16, 0.48), rgba(4, 6, 10, 0.86)),
        var(--register-bg-url, radial-gradient(circle at 50% 25%, #2f3850 0%, #141927 56%, #070b12 100%));
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.register-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 10, 0.22);
    backdrop-filter: blur(1px);
}

.register-topbar,
.register-layout {
    position: relative;
    z-index: 2;
}

.register-topbar {
    background: rgba(8, 11, 18, 0.55);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.register-topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.register-brand {
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.register-brand:hover {
    opacity: 0.85;
}

.register-nav {
    display: flex;
    gap: 6px;
    align-items: center;
}

.register-nav a.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b8bed4;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.register-nav a.nav-btn:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    transform: translateY(-1px);
}

.register-nav a.nav-btn-primary,
.register-nav a.nav-btn.active {
    background: #c9a96e;
    border-color: #c9a96e;
    color: #1a1a1a;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(201, 169, 110, 0.25);
}

.register-nav a.nav-btn-primary:hover,
.register-nav a.nav-btn.active:hover {
    background: #d4b57d;
    border-color: #d4b57d;
    color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 169, 110, 0.35);
}

.register-layout {
    min-height: calc(100vh - 52px);
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 18px 28px;
    display: grid;
    grid-template-columns: 1fr minmax(420px, 560px) 1fr;
    gap: 20px;
    align-items: center;
}

.register-art {
    min-height: 520px;
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;
}

.register-page .register-layout {
    transform: translateY(-18px);
}

.register-art-left {
    background-image: var(--register-left-art-url, none);
}

.register-art-right {
    background-image: var(--register-right-art-url, none);
}

.register-card-wrap h1.hero-title {
    text-align: center;
    margin: 0 0 22px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    line-height: 1.08;
    color: #f7ead2;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.75), 0 0 28px rgba(228, 181, 105, 0.24);
    font-weight: 900;
}

.register-card {
    background:
        linear-gradient(180deg, rgba(56, 47, 38, 0.9), rgba(30, 25, 20, 0.94)),
        rgba(31, 26, 21, 0.94);
    border: 1px solid rgba(241, 207, 146, 0.18);
    border-radius: 18px;
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.58),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    padding: 0;
    overflow: hidden;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.register-card h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: 700;
    color: #ffd893;
    letter-spacing: 0.1px;
}

.register-card .alert {
    margin: 0 0 12px;
    border-radius: 8px;
    padding: 10px 12px;
}

.register-card .alert-success {
    background: rgba(28, 89, 53, 0.88);
    border: 1px solid #2d9155;
}

.register-card .alert-error {
    background: rgba(106, 42, 53, 0.9);
    border: 1px solid #8a3a47;
}

.register-form {
    padding: 22px 24px 22px;
}

.register-form label {
    display: block;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 700;
    color: #f1e8dc;
    text-shadow: none;
}

.register-form input[type="text"],
.register-form input[type="email"],
.register-form input[type="password"],
.register-select {
    margin-top: 6px;
    width: 100%;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(18, 16, 14, 0.72);
    color: #e6dac9;
    padding: 0 15px;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.register-form input:focus,
.register-select:focus {
    border-color: rgba(255, 216, 147, 0.62);
    background: rgba(18, 16, 14, 0.88);
    box-shadow: 0 0 0 3px rgba(255, 216, 147, 0.08);
}

.register-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 700;
    color: #f4f0e8;
    cursor: pointer;
    text-shadow: none;
}

.register-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #e8c887;
}

.register-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffd28a, #edae56);
    color: #000;
    font-weight: 800;
    font-size: 14px;
    padding: 11px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 10px 22px rgba(237, 174, 86, 0.22);
}

.login-auth-page .register-submit {
    min-width: 108px;
    background: linear-gradient(180deg, #ffd89c, #efb76c);
    border-radius: 13px;
    padding: 11px 18px;
}

.register-auth-page .register-submit {
    min-width: 194px;
    background: linear-gradient(180deg, #ffd74f, #ffbd2e);
    border-radius: 11px;
    padding: 11px 18px;
}

.register-submit:hover {
    background: linear-gradient(180deg, #ffe0a9, #f3b85f);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(237, 174, 86, 0.3);
}

.register-footer-links {
    margin-top: 12px;
    border-top: 1px solid #252b39;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.register-footer-links a {
    color: #9ca8ca;
}

.register-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 17px 24px;
    background: linear-gradient(180deg, rgba(62, 51, 40, 0.98), rgba(51, 42, 33, 0.98));
    border-bottom: 1px solid rgba(255, 216, 147, 0.08);
}

.lang-select select {
    width: 75px;
    height: 32px;
    background: rgba(22, 19, 17, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #d3c7b8;
    padding: 0 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.register-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.register-card-footer {
    min-height: 66px;
    background: rgba(22, 19, 16, 0.76);
    border-top: 1px solid rgba(255, 216, 147, 0.07);
    padding: 22px 18px;
    display: flex;
    justify-content: center;
    gap: 18px;
    font-size: 13px;
    font-weight: 800;
}

.register-card-footer a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #c9bca8;
    text-decoration: none;
    transition: color 0.2s;
}

.register-card-footer a:hover {
    color: #e8c887;
}

.register-section-title {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 46px;
    margin: -22px -24px 22px;
    padding: 0 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.42);
    font-size: 14px;
    font-weight: 700;
    color: #e4ddd2;
    background: rgba(255, 255, 255, 0.03);
    text-shadow: none;
}

.register-input-group {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 6px;
}

.register-input-group .prefix {
    width: auto;
    min-width: 84px;
    height: 42px;
    border-radius: 10px 0 0 10px;
    border-right: none;
    margin-top: 0;
    padding: 0 18px;
    font-size: 12px;
    color: #a89a88;
}

.register-input-group .btn-icon {
    flex: 0 0 42px;
    height: 42px;
    border-radius: 0;
    border-right: none;
    margin-top: 0;
}

.register-input-group input {
    flex: 1;
    height: 42px;
    margin-top: 0;
    border-radius: 0 10px 10px 0;
}

.register-input-icon {
    position: relative;
    margin-top: 6px;
}

.register-input-icon svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9a8e7e;
    pointer-events: none;
}

.register-input-icon input {
    padding-left: 44px;
}

.register-input-icon.right .btn-icon {
    position: absolute;
    right: 0;
    top: 0;
    height: 42px;
    border-radius: 0 10px 10px 0;
}

.register-input-icon.right .btn-icon svg {
    position: static;
    transform: none;
    pointer-events: auto;
}

.register-input-icon.right input {
    padding-right: 54px;
    padding-left: 12px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 25, 20, 0.7);
    color: #9a8e7e;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e8c887;
    border-color: rgba(232, 200, 135, 0.3);
}

.register-auth-page .register-input-group {
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(18, 16, 14, 0.72);
}

.register-auth-page .register-input-group .prefix {
    min-width: 92px;
    height: 42px;
    border: 0;
    border-radius: 0;
    background: transparent;
    margin: 0;
}

.register-auth-page .register-input-group .refresh-btn {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-top: 0;
    border-bottom: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.03);
    margin: 0;
}

.register-auth-page .register-input-group input {
    height: 42px;
    border: 0;
    border-radius: 0;
    background: transparent;
    margin: 0;
}

.register-auth-page .email-input > svg {
    left: 16px;
    width: 16px;
    height: 16px;
}

.register-auth-page .email-input input {
    padding-left: 48px;
}

.register-auth-page .password-input .eye {
    position: static;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-top: none;
    border-right: none;
    border-bottom: none;
    border-radius: 0 10px 10px 0;
}

.register-auth-page .password-input .eye svg {
    position: static !important;
    left: auto;
    top: auto;
    transform: none !important;
    display: block;
    pointer-events: auto;
}

.register-auth-page .password-input input {
    flex: 1;
    height: 42px;
    border: none;
    border-radius: 10px 0 0 10px;
    background: transparent;
    margin: 0;
    padding-left: 12px;
    padding-right: 12px;
}

.register-auth-page .password-input {
    display: flex;
    align-items: center;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(18, 16, 14, 0.72);
}

.register-hint {
    font-size: 13px;
    font-weight: 800;
    color: #bfb5a7;
    margin-top: -8px;
    margin-bottom: 18px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}

.toast-stack {
    position: fixed;
    top: 74px;
    right: 24px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    position: relative;
    overflow: hidden;
    padding: 15px 18px 15px 48px;
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
    animation: toast-lifecycle 4s ease forwards;
}

.toast::before {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 900;
}

.toast::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.45);
}

.toast-success {
    border: 1px solid rgba(96, 211, 148, 0.38);
    background: linear-gradient(135deg, rgba(22, 122, 72, 0.94), rgba(10, 67, 45, 0.9));
}

.toast-success::before {
    content: "✓";
    background: rgba(255, 255, 255, 0.16);
    color: #c8ffd9;
}

.toast-error {
    border: 1px solid rgba(255, 109, 132, 0.4);
    background: linear-gradient(135deg, rgba(137, 38, 58, 0.96), rgba(75, 24, 36, 0.92));
}

.toast-error::before {
    content: "!";
    background: rgba(255, 255, 255, 0.16);
    color: #ffd3da;
}

@keyframes toast-lifecycle {
    0% {
        opacity: 0;
        transform: translateX(24px) translateY(-6px);
    }
    9% {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
    86% {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(28px) translateY(-6px);
    }
}

@media (max-width: 980px) {
    .register-layout {
        grid-template-columns: 1fr;
    }

    .register-art {
        display: none;
    }
}
