* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Inter, Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== ГЛАВНАЯ ===== */
.main-bg {
    min-height: 100vh;
    background:
        radial-gradient(60% 80% at 20% 0%, #4b2a82 0%, transparent 60%),
        #05060d;
    color: #fff;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 48px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.logo span {
    opacity: .5;
}

.button {
    padding: 10px 20px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    font-size: 14px;
    transition: .3s;
}

.button:hover {
    background: rgba(255,255,255,.1);
}

.login-link {
    color: #cfc6ff;
}

.center {
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.center h1 {
    font-size: 56px;
    line-height: 1.2;
}

.center h1 span {
    color: #9f7cff;
}

.center p {
    max-width: 600px;
    opacity: .7;
    margin: 24px 0;
}

.btn-main {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.2);
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: .3s;
    font-size: 16px;
}

.btn-main:hover {
    background: #9f7cff;
    border-color: #9f7cff;
}

/* ===== LOGIN ===== */
.login-bg {
    min-height: 100vh;
    background: #05060d;
    color: #fff;
}

.back-btn {
    position: absolute;
    top: 24px;
    left: 24px;
    opacity: .7;
    z-index: 10;
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.login-left {
    padding: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-left .logo.big {
    font-size: 32px;
    margin-bottom: 40px;
}

/* ===== AUTH TABS ===== */
.auth-tabs {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.tab-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,.4);
    font-size: 24px;
    font-weight: 600;
    padding-bottom: 12px;
    cursor: pointer;
    transition: .3s;
    position: relative;
}

.tab-btn.active {
    color: #fff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #9f7cff;
}

.hint {
    opacity: .6;
    margin: 16px 0 32px;
    line-height: 1.5;
}

/* ===== FORM ===== */
label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    opacity: .8;
}

input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 999px;
    background: #0c0f1a;
    border: 1px solid rgba(255,255,255,.1);
    color: #fff;
    margin-bottom: 16px;
    font-size: 14px;
    transition: .3s;
}

input:focus {
    outline: none;
    border-color: #9f7cff;
}

input.error-input {
    border-color: #ff6b6b !important;
}

.password {
    position: relative;
}

.toggle-pass {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: .5;
    transition: .3s;
    user-select: none;
    margin-top: -8px;
}

.toggle-pass:hover {
    opacity: 1;
}

.error {
    color: #ff6b6b;
    font-size: 13px;
    display: block;
    margin-top: -12px;
    margin-bottom: 16px;
    min-height: 20px;
}

.checking {
    color: #9f7cff;
    font-size: 13px;
    display: none;
    margin-top: -12px;
    margin-bottom: 16px;
}

.checking.show {
    display: block;
}

.checking.valid {
    color: #6bcf7f;
}

.checking.invalid {
    color: #ff6b6b;
}

.password-strength {
    height: 4px;
    background: rgba(255,255,255,.1);
    border-radius: 2px;
    margin: -8px 0 16px;
    overflow: hidden;
}

.password-strength::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: #ff6b6b;
    transition: .3s;
}

.password-strength.weak::after {
    width: 33%;
    background: #ff6b6b;
}

.password-strength.medium::after {
    width: 66%;
    background: #ffd93d;
}

.password-strength.strong::after {
    width: 100%;
    background: #6bcf7f;
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    opacity: .7;
    margin-bottom: 16px;
}

.row label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}

.row input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-row {
    margin: 16px 0;
    font-size: 14px;
    opacity: .8;
}

.checkbox-row a {
    color: #9f7cff;
    text-decoration: underline;
}

.full {
    width: 100%;
    margin-top: 8px;
}

.small {
    text-align: center;
    margin-top: 24px;
    opacity: .6;
    font-size: 14px;
}

.small a {
    color: #9f7cff;
    text-decoration: underline;
}

/* ===== STEPS ===== */
#step2 h2, #step3 h2 {
    font-size: 28px;
    margin-bottom: 16px;
}

.code-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 32px 0;
}

.code-digit {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid rgba(255,255,255,.2);
    background: #0c0f1a;
    color: #fff;
    border-radius: 12px;
    transition: .3s;
    margin-bottom: 0;
}

.code-digit:focus {
    border-color: #9f7cff;
    outline: none;
    transform: scale(1.05);
}

.code-digit.filled {
    border-color: #6bcf7f;
    background: rgba(107, 207, 127, 0.1);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    padding: 12px 24px;
    border-radius: 999px;
    cursor: pointer;
    transition: .3s;
    margin-top: 16px;
    font-size: 14px;
}

.btn-secondary:hover {
    background: rgba(255,255,255,.1);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #6bcf7f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #05060d;
    margin: 0 auto 24px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ===== RIGHT ===== */
.login-right {
    background: linear-gradient(180deg, #3b1b73, #2a1450);
    padding: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-right h3 {
    font-size: 32px;
    margin-bottom: 24px;
}

.login-right p {
    opacity: .8;
    line-height: 1.6;
    margin-bottom: 32px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tags span {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    font-size: 14px;
}

/* ===== LOADING ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 968px) {
    .login-wrapper {
        grid-template-columns: 1fr;
    }
    
    .login-right {
        display: none;
    }
    
    .login-left {
        padding: 100px 24px 40px;
    }
    
    .center h1 {
        font-size: 36px;
    }
    
    .top-bar {
        padding: 16px 24px;
        flex-wrap: wrap;
        gap: 12px;
    }
}