* {
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body{
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f1419 100%);
    min-height:100vh; display:flex; align-items:center; justify-content:center;
    position:relative; overflow-x:hidden;
}
body::before{
    content:''; position:fixed; inset:0; z-index:-1;
    background:
        radial-gradient(circle at 20% 80%, rgba(0,255,150,.10) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0,255,100,.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0,255,120,.05) 0%, transparent 50%);
}

.container{ width:100%; max-width:420px; padding:20px; position:relative; z-index:1; }

.main-card{
    background: rgba(15,20,25,.8);
    backdrop-filter: blur(20px);
    border:1px solid rgba(0,255,150,.2);
    border-radius:24px; padding:40px 32px; position:relative; overflow:hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(0,255,150,.1), inset 0 1px 0 rgba(255,255,255,.1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.main-card * {
    font-family: inherit;
}
.main-card::before{
    content:''; position:absolute; top:0; left:0; right:0; height:1px;
    background: linear-gradient(90deg, transparent, rgba(0,255,150,.5), transparent);
}

.header{ text-align:center; margin-bottom:32px; }
.logo{
    width:48px; height:48px; border-radius:12px; margin:0 auto 16px;
    display:flex; align-items:center; justify-content:center; font-size:24px;
    background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); color:#fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.title{ font-size:28px; font-weight:700; color:#fff; letter-spacing:-.5px; margin-bottom:8px; }
.subtitle{ font-size:16px; color:rgba(255,255,255,.6); }

.input-group{
    margin-bottom:20px;
    position:relative;
}
.input-field{ position: relative; }

/* Подсветка ошибок при валидации до отправки */
.input-group.is-invalid input{
    border-color: rgba(255, 71, 87, 0.65) !important;
    background: rgba(255, 71, 87, 0.08) !important;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.12), 0 4px 12px rgba(0,0,0,.2) !important;
}
.agreement-checkbox.is-invalid{
    border-color: rgba(255, 71, 87, 0.55) !important;
    background: rgba(255, 71, 87, 0.06) !important;
}

/* РЎС‚РёР»Рё РґР»СЏ РїРѕР»СЏ РёРјРµРЅРё */
.name-input{ position:relative; }
.name-input .input-field::before{
    content:"👤"; position:absolute; left:16px; top:50%; transform:translateY(-50%);
    font-size:18px; z-index:2; filter:grayscale(1) brightness(.8);
}
.name-input input{
    width:100%; padding:16px 16px 16px 50px;
    background: rgba(255,255,255,.05);
    border:2px solid rgba(255,255,255,.1);
    box-sizing:border-box;
    border-radius:12px; color:#fff; font-size:16px; font-weight:500;
    transition: all .3s ease; backdrop-filter: blur(10px);
}
.input-float-label{ position:relative; }
.input-float-label .float-label{
    position:absolute; left:50px; top:18px;
    font-size:13px; font-weight:500; color:rgba(255,255,255,.5);
    pointer-events:none; transition: all .25s ease;
}
.input-float-label input:focus ~ .float-label,
.input-float-label input:not(:placeholder-shown) ~ .float-label,
.input-float-label.has-value .float-label{
    top:10px; font-size:11px; color:rgba(255,255,255,.45);
}
.name-input input{ padding-top:22px; }
.name-input input::placeholder{ color:rgba(255,255,255,.4); }
.name-input input:focus{
    outline:none; border-color:#35C66B;
    background: rgba(255,255,255,.08);
    box-shadow: 0 0 0 1px rgba(53,198,107,.2);
}

/* РЎС‚РёР»Рё РґР»СЏ РїРѕР»СЏ С‚РµР»РµС„РѕРЅР° */
.phone-input{ position:relative; }
.phone-input .input-field::before{
    content:"📱"; position:absolute; left:16px; top:50%; transform:translateY(-50%);
    font-size:18px; z-index:2; filter:grayscale(1) brightness(.8);
}
.phone-input input{
    width:100%; padding:16px 16px 16px 50px;
    background: rgba(255,255,255,.05);
    border:2px solid rgba(255,255,255,.1);
    box-sizing:border-box;
    border-radius:12px; color:#fff; font-size:16px; font-weight:500;
    transition: all .3s ease; backdrop-filter: blur(10px);
}
.phone-input input{ padding-top:22px; }
.phone-input input::placeholder{ color:rgba(255,255,255,.4); }
.phone-input input:focus{
    outline:none; border-color:#35C66B;
    background: rgba(255,255,255,.08);
    box-shadow: 0 0 0 1px rgba(53,198,107,.2);
}

/* РЎС‚РёР»Рё РґР»СЏ РїРѕР»СЏ email */
.email-input{ position:relative; }
.email-input::before{
    content:"вњ‰пёЏ"; position:absolute; left:16px; top:50%; transform:translateY(-50%);
    font-size:18px; z-index:2; filter:grayscale(1) brightness(.8);
}
.email-input input{
    width:100%; padding:16px 16px 16px 50px;
    background: rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.1);
    border-radius:12px; color:#fff; font-size:16px; font-weight:500;
    transition: all .3s ease; backdrop-filter: blur(10px);
}
.email-input input::placeholder{ color:rgba(255,255,255,.4); }
.email-input input:focus{
    outline:none; border-color: rgba(0,255,150,.5);
    background: rgba(255,255,255,.08);
    box-shadow: 0 0 0 3px rgba(0,255,150,.1), 0 4px 12px rgba(0,0,0,.2);
}

/* РЎС‚РёР»Рё РґР»СЏ РїРѕР»СЏ РїР°СЂРѕР»СЏ */
.password-input{ position:relative; }
.password-input::before{
    content:"рџ”’"; position:absolute; left:16px; top:50%; transform:translateY(-50%);
    font-size:18px; z-index:2; filter:grayscale(1) brightness(.8);
}
.password-input input{
    width:100%; padding:16px 50px 16px 50px;
    background: rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.1);
    border-radius:12px; color:#fff; font-size:16px; font-weight:500;
    transition: all .3s ease; backdrop-filter: blur(10px);
}
.password-input input::placeholder{ color:rgba(255,255,255,.4); }
.password-input input:focus{
    outline:none; border-color: rgba(0,255,150,.5);
    background: rgba(255,255,255,.08);
    box-shadow: 0 0 0 3px rgba(0,255,150,.1), 0 4px 12px rgba(0,0,0,.2);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 3;
}

.password-toggle:hover {
    color: rgba(255, 255, 255, 0.8);
}

.password-toggle i,
.password-toggle #password-eye-icon {
    font-size: 18px !important;
    display: inline-block !important;
    font-style: normal;
    font-weight: 900 !important;
    font-family: "Font Awesome 6 Free" !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.agreements-section{ margin:12px 0; display:grid; gap:16px; }
.agreement-checkbox{
    display:flex; align-items:flex-start; gap:12px;
    padding:9px 16px; border-radius:12px; position:relative; overflow:visible;
    background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08);
    transition: all .3s ease;
    flex-wrap: wrap; /* Р Р°Р·СЂРµС€Р°РµРј РїРµСЂРµРЅРѕСЃ СЌР»РµРјРµРЅС‚РѕРІ */
}
.agreement-checkbox::before{
    content:''; position:absolute; inset:0;
    background: linear-gradient(135deg, rgba(0,255,150,.05), rgba(0,255,100,.02));
    opacity:0; transition: opacity .3s ease;
    pointer-events:none;          /* С„РёРєСЃ: РЅРµ РїРµСЂРµС…РІР°С‚С‹РІР°С‚СЊ РєР»РёРєРё */
    z-index:0;
}
.agreement-checkbox:hover{ border-color: rgba(0,255,150,.2); transform: translateY(-1px); }
.agreement-checkbox:hover::before{ opacity:1; }

.agreement-checkbox input[type="checkbox"]{
    width:18px; height:18px; margin-top:2px; cursor:pointer; accent-color:#00ff96; flex:0 0 auto;
    position:relative; z-index:1;
}
.agreement-checkbox label{
    flex:1; color:#fff; font-size:12px; font-weight:200; line-height:1.4; cursor:pointer;
    position:relative; z-index:1; text-align:left;
}
.agreement-btn{
    background: rgba(0,255,150,.1);
    border:1px solid rgba(0,255,150,.3);
    color:#00ff96; padding:8px 16px; border-radius:8px;
    font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.5px;
    cursor:pointer; min-width:70px; text-align:center; backdrop-filter: blur(10px);
    transition: all .3s ease; position:relative; z-index:1;
    text-decoration: none; display: inline-block;
}
.agreement-btn:hover{ background: rgba(0,255,150,.2); border-color: rgba(0,255,150,.5); transform: translateY(-1px); box-shadow:0 4px 12px rgba(0,255,150,.2); }

.button-group{
    margin-top:32px;
    display:grid;
    gap:12px;          /* С„РёРєСЃ: РјРµР¶РґСѓ РєРЅРѕРїРєР°РјРё Р±СѓРґРµС‚ РѕС‚СЃС‚СѓРї */
}

/* РљРЅРѕРїРєР° СЂРµРіРёСЃС‚СЂР°С†РёРё РІ СЃС‚РёР»Рµ РїР°РЅРµР»Рё */
.register-btn{
    width:100%; padding:14px 0;
    background: rgba(53, 198, 107, 0.1);
    color:#35C66B;
    border:1px solid rgba(53, 198, 107, 0.3);
    border-radius:12px;
    font-size:15px; font-weight:400;
    text-transform:uppercase; letter-spacing:.06em;
    cursor:pointer;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(53, 198, 107, .1);
    position:relative;
    overflow:hidden;
    backdrop-filter: blur(10px);
}
.register-btn:disabled{
    opacity: .55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.register-btn:disabled::before{ display:none; }
.register-btn::before{
    content:'';
    position:absolute;
    top:0; left:-100%;
    width:100%; height:100%;
    background: linear-gradient(90deg, transparent, rgba(53, 198, 107, .2), transparent);
    transition: left .5s ease;
}
.register-btn:hover::before{ left:100%; }
.register-btn:hover{
    transform:translateY(-2px);
    background: rgba(53, 198, 107, 0.15);
    border-color: rgba(53, 198, 107, 0.5);
    box-shadow:0 6px 20px rgba(53, 198, 107, .2);
    color:#4ade80;
}
.register-btn:active{
    transform:translateY(0);
    box-shadow:0 2px 8px rgba(53, 198, 107, .15);
}

.auth-footer-link{ text-align:center; margin:16px 0 0; font-size:14px; color:rgba(255,255,255,.5); }
.auth-footer-link a{ color:#35C66B; font-weight:600; text-decoration:none; }
.auth-footer-link a:hover{ color:#4ade80; text-decoration:underline; }

.login-btn{
    width:100%; padding:14px 24px;
    background: rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.1);
    border-radius:12px; color:#fff; font-size:16px; font-weight:500;
    cursor:pointer; transition: all .3s ease; backdrop-filter: blur(10px);
}
.login-btn:hover{ background: rgba(255,255,255,.08); border-color: rgba(0,255,150,.3); transform: translateY(-1px); }

/* Р•РґРёРЅС‹Р№ РєРѕРЅС‚РµР№РЅРµСЂ РґР»СЏ РІСЃРµС… РѕС€РёР±РѕРє СЃРІРµСЂС…Сѓ С„РѕСЂРјС‹ */
.form-errors-container {
    margin-bottom: 24px;
    min-height: 0; /* РњРёРЅРёРјР°Р»СЊРЅР°СЏ РІС‹СЃРѕС‚Р°, С‡С‚РѕР±С‹ РЅРµ Р·Р°РЅРёРјР°С‚СЊ РјРµСЃС‚Рѕ РєРѕРіРґР° РїСѓСЃС‚Рѕ */
    transition: min-height 0.3s ease;
}

.form-errors-container:not(:empty) {
    min-height: auto; /* РђРІС‚РѕРјР°С‚РёС‡РµСЃРєР°СЏ РІС‹СЃРѕС‚Р° РєРѕРіРґР° РµСЃС‚СЊ РѕС€РёР±РєРё */
}

.form-error-message {
    color: #ff4757;
    font-size: 13px;
    font-weight: 500;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    margin-bottom: 4px;
    display: block;
    animation: none;
}

/* Ошибки под конкретными полями */
.field-error{
    margin-top: 6px;
    margin-bottom: 20px;
}

.form-error-message:last-child {
    margin-bottom: 0;
}

.form-success-message {
    color: #00ff96;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
    padding: 12px 16px;
    background: rgba(0,255,150,.1);
    border: 1px solid rgba(0,255,150,.2);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Оверлей модалки — единый вид во всех браузерах */
.glass-modal{
    position:fixed; top:0; left:0; right:0; bottom:0;
    display:none; justify-content:center; align-items:center; z-index:1000;
    background: rgba(0,0,0,.8);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 20px;
    box-sizing: border-box;
}

/* Контейнер модалки: flex-колонка, фиксированные размеры, скролл только в теле */
.glass-content{
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    color: #fff;
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    min-height: 200px;
    border: 1px solid rgba(0,255,150,.45);
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(0,255,150,.1);
    overflow: hidden;
}

/* Шапка: заголовок + кнопка закрытия (не скроллится) */
.glass-modal-header{
    flex: 0 0 auto;
    position: relative;
    padding: 20px 56px 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.glass-modal-title{
    margin: 0;
    color: #00c172;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}
@media (min-width: 480px){
    .glass-modal-title{ font-size: 22px; }
}

/* Тело модалки — единственная прокручиваемая область (скроллбар внутри) */
.glass-modal-body{
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px;
    -webkit-overflow-scrolling: touch;
    /* Firefox: единый вид скроллбара */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.35) transparent;
}
/* WebKit (Chrome, Safari, Edge): единый вид скроллбара */
.glass-modal-body::-webkit-scrollbar{
    width: 8px;
}
.glass-modal-body::-webkit-scrollbar-track{
    background: transparent;
}
.glass-modal-body::-webkit-scrollbar-thumb{
    background: rgba(255,255,255,.35);
    border-radius: 4px;
}
.glass-modal-body::-webkit-scrollbar-thumb:hover{
    background: rgba(255,255,255,.5);
}

/* Подвал с кнопкой (не скроллится) */
.glass-modal-footer{
    flex: 0 0 auto;
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(255,255,255,.08);
}

/* Текст внутри тела модалки */
.glass-modal-body .agreement-content{
    line-height: 1.6;
}
.glass-modal-body p{
    line-height: 1.6;
    margin-bottom: 16px;
    color: rgba(255,255,255,.9);
}

.modal-close-btn{
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #1a472a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 10;
    padding: 0;
    font-weight: 300;
    flex-shrink: 0;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.modal-close-icon{
    display: block;
    line-height: 1;
    transform: translateY(-1px);
}
.modal-close-btn:hover{
    background: #2d6b3e;
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.close-btn{
    background: #1a472a;
    border: 1px solid rgba(0, 255, 150, 0.3);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    width: 100%;
    transition: background .2s ease, border-color .2s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    cursor: pointer;
}
.close-btn:hover{
    background: #2d6b3e;
    border-color: rgba(0, 255, 150, 0.45);
}

@media (max-width:480px){
    .container{ padding:16px; }
    .main-card{ padding:32px 24px; }
    .title{ font-size:24px; }
}

.loading{ position:relative; pointer-events:none; color:transparent !important; }
.loading::after{
    content:''; position:absolute; top:50%; left:50%; width:20px; height:20px; margin:-10px 0 0 -10px;
    border:2px solid rgba(0,255,150,.3); border-top:2px solid #00ff96; border-radius:50%;
    animation: spin 1s linear infinite;
}
@keyframes spin{ 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }
