@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap');

*{
    box-sizing: border-box;
}
html{
    height: 90%;
    width: 100%;
    overflow-x: hidden;
}

body{
    height: 110%;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0 32px;
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 50%, #ddd6fe 100%);
    font-family: "Ubuntu";
    animation: rotate 6s infinite alternate linear;
    opacity: 0;
	transition: .9s opacity ease-in-out;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
.body_visible {
	opacity: 1;
    }
.logo{
    margin-bottom: 20px;
}

.logo img{
    max-height: 60px;
    width: auto;
}

.circle{
    position: fixed;
    top: -48vmin;
    left: -20vmin;
    width: 80vmin;
    height: 80vmin;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    background: #9333ea;
    filter: blur(40px);
    z-index: 1;
}

.circle::before{
    content: "";
    position: fixed;
    right: -150vmin;
    bottom: -48vmin;
    width: 80vmin;
    height: 80vmin;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: #7c3aed;
    filter: blur(30px);
    z-index: 1;
}


.card{
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 760px;
    padding: 42px 36px 34px;
    border-radius: 1.25rem;
    background: #fff;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: cardSlideIn 0.8s ease-out;
}


.form-header{
    margin-bottom: 25px;
    animation: fadeInUp 0.8s ease-out;
    margin-top: 25px;
}

.form-header h2{
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #2a3444;
    background: linear-gradient(135deg, #9333ea, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-header p{
    font-size: 14px;
    color: #718096;
    margin: 0;
    font-weight: 400;
}

.form{
    margin: 0 0 10px;
    display: grid;
    gap: 10px;
}

.form>input, .form>select, .form>button{
    width: 100%;
    height: 48px;
    border-radius: 25px;
}

.field-hint {
    margin: -2px 8px 8px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
}

.email-hint {
    font-size: 10px;
    line-height: 1.3;
    margin: -4px 10px 2px;
    color: #9ca3af;
}

.form>input{
    border: 2px solid #e0e0e0;
    font-family: inherit;
    font-size: 16px;
    padding: 0 24px;
    color: #11274c;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: inputSlideIn 0.6s ease-out;
    animation-fill-mode: both;
}

.form>input:hover{
    border: 2px solid #9333ea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.15);
}

.form>input:focus{
    outline: none;
    border: 2px solid #9333ea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.25);
    background: rgba(255, 255, 255, 1);
}

.form>input:invalid:not(:placeholder-shown):not([list]){
    border: 2px solid #ff6b6b;
    animation: shake 0.5s ease-in-out;
}

.form>input[type="date"]:invalid:not(:placeholder-shown){
    border: 2px solid #ff6b6b;
}

.form>input[type="date"]{
    text-align: left !important;
    direction: ltr;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}

.form>input[type="date"]::-webkit-date-and-time-value{
    text-align: left !important;
}

.form>input[type="date"]::-webkit-datetime-edit-fields-wrapper{
    text-align: left !important;
}

.form>input[type="date"]::-webkit-datetime-edit{
    color: #11274c;
    text-align: left !important;
    padding: 0;
}

.form>input[type="date"]:invalid::-webkit-datetime-edit{
    color: #cac8c8;
}

.form>input:valid:not(:placeholder-shown){
    border: 2px solid #9333ea;
}

.form>input::placeholder{
    color: #cac8c8;
}

/* Стили для select (выпадающий список школ) */
.form>select{
    border: 2px solid #e0e0e0;
    font-family: inherit;
    font-size: 16px;
    padding: 0 24px;
    color: #11274c;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: inputSlideIn 0.6s ease-out;
    animation-fill-mode: both;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239333ea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 12px;
    padding-right: 45px;
    touch-action: manipulation;
}

.form>select:hover{
    border: 2px solid #9333ea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.15);
}

.form>select:focus{
    outline: none;
    border: 2px solid #9333ea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.25);
    background: rgba(255, 255, 255, 1);
}

.form>select:disabled{
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f5f5f5;
}

.form>select option{
    padding: 10px;
    color: #11274c;
}

.form>button{
    cursor: pointer;
    width: 100%;
    height: 50px;
    padding: 0 16px;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: #f9f9f9;
    border: 0;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: buttonSlideIn 0.8s ease-out;
    animation-fill-mode: both;
}

.form>button:hover{
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(147, 51, 234, 0.4);
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.form>button:active{
    transform: translateY(-1px);
}

.form>button:disabled{
    cursor: not-allowed;
    opacity: 0.6;
    background: linear-gradient(135deg, #999 0%, #777 100%);
    transform: none;
    box-shadow: none;
}

.form>button:disabled:hover{
    transform: none;
    box-shadow: none;
}

.form>button.loading{
    color: transparent;
}

.form>button.loading::after{
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.form>button.success{
    background: #9333ea;
    color: #fff;
}

.form>button.success::after{
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    animation: checkmark 0.6s ease-in-out;
}

/* Чекбокс пользовательского соглашения */
.agreement-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0;
    padding: 0 5px;
    font-size: 14px;
    line-height: 1.5;
}

.agreement-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #9333ea;
}

.agreement-checkbox label {
    color: #2a3444;
    cursor: pointer;
    user-select: none;
    flex: 1;
}

.agreement-checkbox label a {
    color: #9333ea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.agreement-checkbox label a:hover {
    color: #7c3aed;
    text-decoration: underline;
}

.agreement-checkbox input[type="checkbox"]:invalid + label {
    color: #ff6b6b;
}

.card>footer{
    color: #7c7c7c;
}

.card>footer>a{
    color: #216ce7;
    transition: all 0.375s;
}



/* Анимации */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes inputSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes buttonSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes checkmark {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Прогресс-бар */
.progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #9333ea, #7c3aed);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #9333ea, #7c3aed);
}

.notification.error {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
}

@media (width >=500px) {
    body{
        padding: 0;
    }
    .card{
        margin: 0;
        width: min(760px, calc(100vw - 48px));
    }
    .circle{
        width: 650px;
        top: -10vmin;
        
    }
}

@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100dvh;
        display: block;
        place-items: unset;
        padding: 12px 10px;
        overflow-x: hidden;
    }

    .card {
        max-width: 520px;
        width: 100%;
        margin: 0 auto;
        padding: 26px 16px 24px;
        border-radius: 16px;
    }

    .form-header h2 {
        font-size: 21px;
    }

    .form > input,
    .form > select,
    .form > button {
        height: 46px;
        font-size: 15px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .agreement-checkbox {
        font-size: 13px;
        padding: 0;
    }

    .field-hint {
        font-size: 12px;
        margin-left: 4px;
        margin-right: 4px;
    }

    .email-hint {
        font-size: 9px;
        margin-left: 8px;
        margin-right: 8px;
    }
}

