/* Стили для страниц аутентификации */

/* Основное тело страницы */
.auth-body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.auth-body .footer.footer--legal-only {
    position: relative;
    z-index: 20;
    width: 100%;
    flex-shrink: 0;
    margin-top: auto;
}

/* Фоновые анимированные элементы */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.auth-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 70%;
    right: 10%;
    animation-delay: 7s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 50%;
    left: 80%;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-40px) rotate(180deg);
        opacity: 0.1;
    }
    75% {
        transform: translateY(-20px) rotate(270deg);
        opacity: 0.3;
    }
}

/* Основной контейнер */
.auth-container {
    position: relative;
    z-index: 10;
    flex: 1;
    width: 100%;
    padding: 2rem 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Заголовок с навигацией */
.auth-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.auth-logo {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo-green {
    background: linear-gradient(135deg, #a3e635, #84cc16);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Основная карточка формы */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    max-width: 500px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #a3e635);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.card-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.card-header p {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

/* Стили форм */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #9ca3af;
    font-size: 1rem;
    z-index: 2;
    transition: color 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-input:focus + .input-icon,
.form-input:not(:placeholder-shown) + .input-icon {
    color: #667eea;
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    min-height: 1rem;
}

/* Согласия при регистрации */
.auth-agreements {
    margin: 0.25rem 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.auth-agreements-error {
    text-align: left;
    margin-top: 0.15rem;
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #475569;
}

.auth-check input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.auth-check-box {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #cbd5e1;
    border-radius: 7px;
    margin-top: 0.1rem;
    background: #fff;
    position: relative;
    transition: all 0.2s ease;
}

.auth-check input:checked + .auth-check-box {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
}

.auth-check input:checked + .auth-check-box::after {
    content: '';
    position: absolute;
    left: 0.38rem;
    top: 0.12rem;
    width: 0.3rem;
    height: 0.58rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-check-text a {
    color: #667eea;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-check-text a:hover {
    color: #764ba2;
}

/* Кнопки */
.auth-button {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.auth-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.auth-button:hover::before {
    left: 100%;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-footer {
    text-align: center;
}

.form-footer p {
    color: #64748b;
    margin: 0;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Стили для страницы входа */
.login-page .auth-body {
    background: linear-gradient(135deg, #667eea 0%, #a3e635 100%);
}

.login-card {
    max-width: 450px;
}

.login-button {
    background: linear-gradient(135deg, #10b981, #059669);
}

.login-button:hover {
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

/* Информация о безопасности */
.security-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #64748b;
}

.security-item:last-child {
    margin-bottom: 0;
}

.security-item i {
    color: #10b981;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Преимущества регистрации */
.auth-benefits {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-benefits h3 {
    color: #1a202c;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.benefit-item:hover {
    transform: translateX(5px);
}

.benefit-item i {
    color: #a3e635;
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.benefit-item span {
    color: #374151;
    font-weight: 500;
}

/* Роли на странице входа */
.auth-roles {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    width: 100%;
    max-width: 600px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-roles h3 {
    color: #1a202c;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.roles-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.role-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.role-card:hover {
    transform: translateY(-5px);
    border-color: #a3e635;
    box-shadow: 0 10px 25px rgba(163, 230, 53, 0.2);
}

.role-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #a3e635, #84cc16);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
}

.role-icon i {
    color: white;
    font-size: 1.5rem;
}

.role-card h4 {
    color: #1a202c;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.role-card p {
    color: #64748b;
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.4;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

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

.modal-header {
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #1a202c;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #ef4444;
}

.modal-body {
    padding: 2rem;
}

/* Информация о верификации */
.verification-info {
    text-align: center;
    margin-bottom: 2rem;
}

.verification-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
}

.login-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.verification-icon i {
    color: white;
    font-size: 2rem;
}

.verification-info p {
    color: #64748b;
    margin: 0.5rem 0;
    line-height: 1.6;
}

.email-display {
    display: inline-block;
    background: #f3f4f6;
    color: #1a202c;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin: 0.5rem 0;
}

.code-timer {
    font-weight: 600;
    color: #ef4444;
}

/* Поля ввода кода */
.code-input-container {
    margin-bottom: 2rem;
}

.code-input-container label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    text-align: center;
}

.code-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.code-input {
    width: 50px;
    height: 50px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: white;
    transition: all 0.3s ease;
    outline: none;
}

.code-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.code-input.filled {
    border-color: #10b981;
    color: #10b981;
}

.code-input.error {
    border-color: #ef4444;
    color: #ef4444;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Кнопка верификации */
.verify-button {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.login-verify {
    background: linear-gradient(135deg, #10b981, #059669);
}

.verify-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.login-verify:hover {
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

.verify-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Секция повторной отправки */
.resend-section {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.resend-section p {
    color: #64748b;
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
}

.resend-btn {
    background: none;
    border: none;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.resend-btn:hover {
    color: #764ba2;
}

.resend-btn:disabled {
    color: #9ca3af;
    cursor: not-allowed;
    text-decoration: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .auth-header {
        margin-bottom: 1.5rem;
    }
    
    .auth-logo {
        font-size: 1.5rem;
    }
    
    .card-header h1 {
        font-size: 1.5rem;
    }
    
    .roles-list {
        grid-template-columns: 1fr;
    }
    
    .role-card {
        padding: 1rem;
    }
    
    .code-inputs {
        gap: 0.25rem;
    }
    
    .code-input {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 0.75rem;
    }
    
    .auth-card {
        padding: 1.5rem 1rem;
    }
    
    .back-link span {
        display: none;
    }
    
    .code-input {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .benefits-list,
    .roles-list {
        gap: 0.75rem;
    }
    
    .benefit-item {
        padding: 0.75rem;
    }
}

/* Стили для индикатора роли */
.role-indicator {
    margin-bottom: 1.5rem;
    text-align: center;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.5s ease;
}

.student-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.teacher-badge {
    background: linear-gradient(135deg, #10b981, #059669);
}

.role-badge i {
    font-size: 1rem;
}

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