.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    padding: 0;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    text-align: center;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 4px;
}

.close-btn:hover {
    color: #666;
}

.modal-logo {
    font-size: 24px;
    font-weight: 600;
    color: #4285f4;
    margin-bottom: 16px;
}

.tabs {
    display: flex;
    margin-bottom: 16px;
}

.tab {
    flex: 1;
    padding: 12px 16px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
}

.tab:first-child {
    border-radius: 8px 0 0 8px;
}

.tab:last-child {
    border-radius: 0 8px 8px 0;
}

.tab.active {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom: 1px solid white;
    margin-bottom: -1px;
}

.modal-body {
    padding: 24px;
}

.form-title {
    margin-top: 20px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
}

input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

input::placeholder {
    color: #999;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 16px;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 8px;
}

.submit-btn:hover {
    background: #3367d6;
}

.forgot-password {
    text-align: center;
    margin-top: 16px;
}

.forgot-password a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password a:hover {
    color: #4285f4;
}

.form-container {
    display: none;
}

.form-container.active {
    display: block;
}

.phone-input {
    padding-left: 80px;
}

.phone-prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 14px;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-title {
        font-size: 36px;
    }

    .nav-menu {
        gap: 20px;
    }
}

.form-errors {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
    border-radius: 0.375rem;
}

.form-errors ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.form-errors li {
    margin-bottom: 0.25rem;
}

.field-errors {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.field-errors ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.field-errors li {
    margin-bottom: 0.1rem;
}

/* Стили для полей с ошибками */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Дополнительные стили для улучшения внешнего вида */
.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.phone-prefix {
    padding: 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-right: none;
    border-radius: 0.375rem 0 0 0.375rem;
    color: #6c757d;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.submit-btn {
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1rem;
}

.submit-btn:hover {
    background-color: #0056b3;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-window {
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal-btn.danger {
    background-color: #999999;
    color: white;
    text-decoration: none;
}

