@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap');

*{
    box-sizing: border-box;
}
html{
    height: 90%;
}

body{
    height: 110%;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0 32px;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4f1d4 50%, #c8e6c8 100%);
    font-family: "Ubuntu";
    animation: rotate 6s infinite alternate linear;
    opacity: 0;
	transition: .9s opacity ease-in-out;
}
.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: #00CC00;
    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: #009900;
    filter: blur(30px);
    z-index: 1;
}


.card{
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 320px;
    padding: 40px 25px 30px;
    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, #2a3444, #4a5568);
    -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: 8px;
}

.form>input, .form>select, .form>button{
    width: 100%;
    height: 45px;
    border-radius: 25px;
}

.field-hint {
    margin: -2px 8px 4px;
    color: #6b7280;
    font-size: 12px;
    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 #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.form>input:focus{
    outline: none;
    border: 2px solid #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 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;
}

/* Поля с выпадающим списком (район, класс) — своя стрелка как у select */
.form>input[list]{
    -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='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 12px;
    padding-right: 45px;
}

.form>input:valid:not(:placeholder-shown){
    border: 2px solid #51cf66;
}

.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='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 12px;
    padding-right: 45px;
}

.form>select:hover{
    border: 2px solid #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.form>select:focus{
    outline: none;
    border: 2px solid #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 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, #667eea 0%, #764ba2 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(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 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: #51cf66;
    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: #667eea;
}

.agreement-checkbox label {
    color: #2a3444;
    cursor: pointer;
    user-select: none;
    flex: 1;
}

.agreement-checkbox label a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.agreement-checkbox label a:hover {
    color: #764ba2;
    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, #667eea, #764ba2);
    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, #51cf66, #40c057);
}

.notification.error {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
}

/* Мобильные: плашка даты рождения и стрелки у района/класса/школы */
@media (max-width: 768px) {
    .card {
        max-width: 100%;
        padding: 24px 20px 24px;
    }
    .form>input,
    .form>select {
        min-height: 48px;
    }
    .form>input[type="date"] {
        font-size: 16px;
        min-height: 48px;
        padding: 0 20px;
    }
    .form>select,
    .form>input[list] {
        background-size: 18px;
        background-position: right 16px center;
        padding-right: 48px;
    }
    .form>input[list] {
        background-size: 18px;
        background-position: right 16px center;
        padding-right: 48px;
    }
    .field-hint {
        font-size: 11px;
        margin-left: 4px;
        margin-right: 4px;
    }
    .email-hint {
        font-size: 9px;
        margin-left: 8px;
        margin-right: 8px;
    }
}

@media (width >=500px) {
    body{
        padding: 0;
    }
    .card{
        margin: 0;
        width: 320px;
    }
    .circle{
        width: 650px;
        top: -10vmin;
        
    }
}